Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way I can launch a new instance of Google Chrome from the command line? I'm not referring to opening a new window - I want a new instance. Here's why:

Suppose I open Chrome and navigate to a page somewhere. Then I SSH into the same account from somewhere else. When I run:

google-chrome

...all I get is a new tab in the existing window. This is absolutely useless when I'm connected via SSH.

How can I launch a separate instance of Chrome that runs in the same account, but is usable with SSH?

share|improve this question
1  
Incognito mode? google-chrome --incognito ? – theTuxRacer Apr 16 '11 at 5:08
    
@Kaustubh doesnt help – trampster Apr 16 '11 at 6:03
up vote 18 down vote accepted

This is a known bug. A workaround posted there is to pass the argument --user-data-dir (with no directory) to start a new session.

share|improve this answer
1  
Thanks! I was looking for details on how to do that. I also posted it back at superuser.com/a/457045/132608, which was the first StackExchange variant of this question I found. – justis Aug 3 '12 at 2:01
2  
This no longer works with recent versions of Chrome, but you can effectively start with a "blank slate" new account by specifying a temporary or empty directory, e.g. chromium-browser --user-data-dir=/tmp – Dan Dec 3 '15 at 22:16

Use --new-window parameter.

Like: 

google-chrome --new-window www.google.com
share|improve this answer
    
google.chrome ... not chrome ... – Mostafa Ahangarha Mar 18 at 10:24
    
@MostafaAhangarha thanks, I changed it to google-chrome – kimwue Mar 21 at 8:02
    
Read the question: I'm not referring to opening a new window - I want a new instance. – Mostafa Ahangarha Mar 21 at 8:29

I do this

cd ~/.config/google-chrome
mkdir /tmp/chrome2
find . -print | cpio -mpdv /tmp/chrome2 # there was no cp -R in my day!
rm -fr /tmp/chrome2/Singleton*
rm -fr /tmp/chrome2/Session* 
google-chrome --user-data-dir=/tmp/chrome2/

Instead of the cpio/rm lines I'm using this now

rsync -av --delete --exclude=/Singleton* --exclude=/Session* ~/.config/google-chrome/ /tmp/chrome2/
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.