Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Ubuntu, to control Opera from the command line you would use the command

opera -remote "openURL(www.google.com)"

is there a command like that for Google Chrome? Using the command

/usr/bin/google-chrome www.google.com

just opens a new window.

share|improve this question

migrated from stackoverflow.com Aug 10 '11 at 17:18

This question came from our site for professional and enthusiast programmers.

    
Works for me, and should work in general. –  Hasturkun Aug 10 '11 at 14:59
add comment

4 Answers

up vote 3 down vote accepted

This worked for me, opening my personal website in a new Chrome window on Ubuntu Linux:

google-chrome http://dotancohen.com

It looks like you are missing the initial http:// part.

share|improve this answer
add comment

The chromix project might be what you're looking for. It allows control of chrome and its tabs from the command line (or within a script).

Disclaimer: I'm it's author.

share|improve this answer
add comment

Here is another (more generic) way to do that (assume chrome is your default browser) :

gnome-open http://superuser.com/
share|improve this answer
add comment

I would just do chromium-browser (for chromium), or google-chrome, and instead of depending on it being there in /usr/bin/google-chrome just rely on you PATH, or if you really want to know exactly where it is just type which google-chrome and it will give you the path note that the which command will tell you the static location of an application

share|improve this answer
add comment

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.