2014年3月2日 星期日

HowTo: Run Firefox From The Command Line

by on March 23, 2011 · 10 comments· LAST UPDATED March 23, 2011
How do I run Firefox browser from the Linux command line (shell prompt)? How to run Firefox from command line on Linux based server?

You can use command line as follows with special arguments to start Mozilla firefox.

Firefox Start Browser

To open the browser, enter:
$ firefox
OR
$ /usr/bin/firefox

Firefox Open URL

To open URL in a new tab, enter:
$ /usr/bin/firefox -new-window http://www.cyberciti.biz/
To open URL in a new window, enter:
$ /usr/bin/firefox www.cyberciti.biz

Firefox Search option

You can search words (term) with your default search engine, enter:
$ /usr/bin/firefox -search "term"
$ /usr/bin/firefox -search "linux add user to group"

Open Firefox Options / Preferences

To open Firefox options/preferences window, enter:
$ /usr/bin/firefox -preferences

Set Firefox As Default Browser

To set the Firefox app as the default browser, enter:
$ /usr/bin/firefox -setDefaultBrowser

How Do I Run Firefox Remotely On Server?

SSH is frequently used to tunnel insecure traffic over the Internet in a secure way. You can login to remote server using the ssh client:
$ ssh -X user@server42.nixcraft.com
To run firefox, enter:
$ /usr/bin/firefox &
$ /usr/bin/firefox www.cyberciti.biz

沒有留言:

張貼留言