How to launch a new instance of Google Chrome from the command line?
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?
Solution 1:
This is a known bug. A workaround posted there is to pass the argument --user-data-dir=/tmp
(with a temporary or empty directory) to start a new session.
Solution 2:
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/