Monday, June 25, 2012

How to setup multiple Google Chrome profiles (on Linux/ ubuntu)?

This might be a rare case that you might want to set up multiple Google Chrome profiles. It happened to me because I had 2 boxes at work and the Google Chrome was installed on NFS. Now when I try to start the Chrome browsers on both the machines (one after another), the second machine always gives me the following error - "The profile appears to be in use by process 4944 on host myname-linux1.  If you are sure no other processes are using this profile, delete the file /home/myname/.config/google-chrome/SingletonLock and relaunch Google Chrome." The reason is obvious that both the boxes are accessing the same NFS allocation. And hence this post:  


To create a new profiles 
  1. Duplicate the google-chrome folder and delete the Singleton Lock. 
    • cd /home/$USER/.config/ 
    • cp -R google-chrome/. profile1 
    • mv profile1 google-chrome/ 
    • cd google-chrome/profile1 
    • rm Singleton* 
    • rm .nfs*  
  2. Add  'Google Chrome' shortcut link to the top panel 
    • On the top of your screen or desktop, Go to Applications menu > Internet > and right click on 'Google Chrome' menu selection. A context menu will pop-up; select the option 'Add this launcher to panel'. This action will add a Google Chrome shortcut link to top bar called 'Panel'  
    • [A panel is an area in the GNOME Desktop where you have access to certain actions and information, no matter what the state of your application windows. For example, in the default GNOME panels, you can launch applications, see the date and time, control the system sound volume, and more. By default, the GNOME Desktop contains a panel at the top edge of the screen, and a panel at the bottom edge of the screen]  
  3. Update the properties of the 'Google Chrome' shortcut 
    • Right click on the 'Google Chrome' shortcut link, and select properties. In the properties dialog box,  
      • Replace 'Google Chrome' with 'Google Chrome - profile1' in the Name textbox 
      • Add the --user-data-dir flag to the Command textbox, as shown below : /opt/google/chrome/google-chrome --user-data-dir=.config/google-chrome/profile1 %U  
  4. Repeat steps 1 - 3 to create multiple profiles (viz., profile2, profile3,...).  

To use the Google chrome profiles 
  1. I had to restart my machines to sync the shortcuts on every Linux box.
  2. On box 1, I clicked on the Google Chrome profile1 shortcut link, and on box 2, I chose Google Chrome profile2 shortcut link, and so on.

To clear any of the profiles
  1. Go to the profile in question, (for example: profile1)
    • cd /home/$USER/.config/google-chrome/profile1
    • rm -R *


Resources:

No comments:

Post a Comment

Tips to save battery power on your Smartphone

We hate to see how our devices loose power. Here's few tips to save your battery power and usage cost: Turn off Mobile data (when u...