Wednesday, June 22, 2011

Web Browser Thoughts: 64-bit Firefox, portable Chrome and Unfreezing Chrome Browser

Firefox 5 browser for desktop and mobile devices, has been released to the "stable" tree, as fruition of the first "Rapid Release" cycle. With this version's release , Firefox 6 would move up to Aurora from Channel, while Firefox 7 remains at "nightly" alpha builds for now.

With rapid releases, the changes between versions are not nearly as much, so you can be fairly sure that a Firefox 4 extension/addon will still work on Firefox 7. On a related note, beta1 of Thunderbird 5.0 has also been released.

It has been bothering me that other than Internet Explorer which has had a native 64-bit version since v6, no other (big name) browser actually seemed to care about 64-bit native versions. Understandably due to a chicken-and-egg situation (with "no Adobe Flash for 64-bit" being the oft-cited excuse). Mozilla itself had a proper Intel 64-bit (x86_64) variant of Firefox available for Linux and OSX, but not Windows. Pretty much the same applied to Google Chrome (to be precise, the Chromium project).

But now, those who want a native 64-bit version of Firefox on Windows can get it from the Nightly builds. You'll need the Microsoft Visual C++ 2010 Redistributable Package (x64) installed too.

Google Chrome Browser and how to make Chromium portable:
The other recent stable release of an alternative browser was Google Chrome 12. If it annoyed you that the installer offered for it was always a 500-odd KB web installer, then here's a direct link to the official Stand-alone and 3rd-party Portable version installers. But as usual, I refuse to let a pre-packaged portable installer dictate even the best terms to me. Below is what I suggest instead:

1. Download a relatively stable Chromium build from BuildBot or Softpedia.
2. Install it to the directory you like, preferably outside of C: drive, to be able to retain it between OS re-formats.
3. Now you may want to pre-configure it before distribution, or make it portable to prevent user profile files from landing up at the %AppData% folder. You can use a batch file for this, or an LNK shortcut.
4. Test your batch file by creating a text-based batch file named "portable.cmd" in the same folder as Chromium's EXE itself. The command is:  start Chromium-folder/chrome.exe --user-data-dir="User Data"
5. Click it, verify that no files are created in the %AppData% folder, and that your user profile is created within the program's folder itself.
6. Adapt the same command for a Desktop/Start Menu shortcut by using full/absolute paths, using System Variables did not seem to work for me. For example, the shortcut target must be
D:\Programs\Chromium\chrome.exe --user-data-dir=D:\Programs\Chromium\UserData
with a Start In folder value of D:\Programs\Chromium\
7. That is all. Note that the quotes as mentioned in the example command above, are to be used in case your folder path name has spaces. Of all the additional switches that could be used, I thought these two were the most deserving of mention: -disable-java and -incognito (what the switches do is obvious).

Next up, if you want to customize the UI by default, the method on Chrome 0.2 used to be as follows:
Dress up Google Chrome to your liking by downloading a Chrome theme and saving its default.dll file into the application's Themes directory - C:\Users\UserName\AppData\Local\Google\Chrome\Application\\Themes\
That technique did not work for themes or WebStore apps, so going onwards to the next now.

Whereas Google Chrome has Adobe Flash included, Chromium does not. Pre-configuring the browser means NOT having to hope that your target PC will have the Flash plugin installed. Solution is as described below:

1. Download and install the latest version of Adobe Flash plugin (not ActiveX, which is only for IE).
2. Now from the folder C:\Windows\System32\Macromed\Flash get the files NPSWF32.dll and NPSWF32_FlashUtil.exe - copy and paste these somewhere temporarily.
3. Go to the folder D:\Programs\Chromium\Plugins (create the "Plugins" folder if it's not already present) and paste the two files that you copied in Step 2.
4. That is it. You might need to install the latest Redist of DirectX 9.0c and copy two DLLs to the same folder as Chromium's EXE.

Recovering from a "Frozen" Chrome
If you open a lot of tabs, in Chromium's incognito mode, a browser freeze/crash leaves you unable to even recover tabs/URLs that were previously open, due to the nature and intent of incognito. Can get mighty frustrating indeed. When a number of tabs are open and you call upon the file "Save As" dialog box often, the browser inexplicably slows down in saving.

Eventually, when you right-click and "Save As", a situation arises where the expected dialog box does not show up, and the browser itself does not respond (this is normal behaviour, if the dialog box is in the foreground). In UX terms, it feels like a loop - the "Save As" has not popped up yet, and the browser is not responding to clicks either. This description is applicable to Windows 7 and Vista.

I tried a number of things, for the 3-4 times this occurred. Each time it got more irritating to lose everything that was ongoing in the browser tabs (face it, a lot of your PC usage nowadays is via browser). Here is the solution that managed to work for me, and has been working each time since the first time I tried it:

1. Make sure your Chrome/Chromium browser freeze is caused by a file "Save As" dialog box stuck in the background, being rendered invisible.
2. Finish up any work in other apps and close them. End processes and services that are non-MS and non-crucial for the moment.
3. Now the important part. End/TaskKill instances of explorer.exe one by one, before finally killing the task named dwm.exe (which renders the GUI).
4. You can now Alt+Tab your way through open apps/windows, but the Windows Taskbar has disappeared. Just as well, since the darned "Save As" dialog box will now be exposed and visible for you to either Cancel or Save the file.
5. Done. Chrome will now be resuscitated. You can bring back the Taskbar, normal Windows UI and other apps. Press Ctrl+Shift+Esc to bring up Windows Task Manager, click "New Task" in Applications tab, and type explorer.exe to do so.

Lastly, I wonder if there is a way to import/export Tabbed Browsing Sessions between different browsers?

No comments:

Post a Comment

No spam please, my eyes are watching you!