Wednesday, September 14, 2011

Create Separate Profiles in Google Chrome, Chromium Browser and Iron.

Iceweasel and firefox come with a profilemanager which can be started with the -P switch :
e.g. for iceweasel :
iceweasel -P
You can always start a new window of Google Chrome, Chromium Browser and Iron in private or incognito mode ( which is a special, different profile : http://www.google.com/support/chrome/bin/answer.py?answer=95464&hl=en-US) with the keyboard shortcuts Ctrl+Shift+N.

As explained here, the default directory of the profile is located at:
Google Chrome : ~/.config/google-chrome/Default
Chromium and Iron : ~/.config/chromium/Default
To make more permanent profiles we can do it manually. Let's take Google Chrome as an example :
Open up a terminal and type in the following :
/usr/bin/google-chrome --user-data-dir=".config/google-chrome/NewProfile", where NewProfile is just the name of the new profile.
This will start Google Chrome with a new, freshly created profile :


If you want to create a different profile but you want all the settings and extensions from the default one just do the following :
( taking Google Chrome as an example again )
create a folder NewProfile inside ~/.config/google-chrome :
cd ~/.config/google-chrome
mkdir NewProfile

and copy the folder Default and the file First Run into the folder NewProfile :
cp -R Default First\ Run NewProfile

Start Google Chrome with the profile NewProfile ( in a new terminal !! ) :
/usr/bin/google-chrome --user-data-dir=".config/google-chrome/NewProfile"
If you don't start a new terminal you will see errors like :

[5728:5728:9257857614:ERROR:CONSOLE(1)] "Uncaught ReferenceError: setShownSections is not defined", source: (1)
[5728:5728:9263544498:ERROR:CONSOLE(1)] "Uncaught ReferenceError: returnExtensionsData is not defined", source: (1)
[5728:5728:9263632214:ERROR:CONSOLE(1)] "Uncaught ReferenceError: returnExtensionsData is not defined", source: (1)
[5728:5728:9263632536:ERROR:CONSOLE(1)] "Uncaught ReferenceError: returnExtensionsData is not defined", source: (1)


and Google Chrome just starts without the settings and extensions of your default profile : I found out that it just start from a folder Default inside ~/.config/google-chrome/.config/google-chrome ( ! )

Now make appropriate entries in the menu : right click Gnome icon in menu > Edit Menus > choose Internet left pane > + New Item in right pane. You will need package alacarte installed.

Note : In newer versions of Google Chrome, you'll be able to enable profiles by navigating to chrome://flags ( Careful, these experiments may bite ! ) and enabling Multiple Profiles. Restart the browser and click the wrench icon > Preferences > Personal Stuff > Users > Add New User. It will start a new window with a new blank profile.

Links :
(1) Iron browser : http://debian-bits-and-snips.blogspot.com/2011/01/srware-iron-browser-of-future.html
http://debian-bits-and-snips.blogspot.com/2011/01/chromium-browser-and-iron-running-side.html
(2) Google Chrome : http://www.google.com/chrome/index.html?hl=en
(3) List of Chromium Command Line Switches : http://peter.sh/experiments/chromium-command-line-switches/

No comments:

Post a Comment