Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-24-2012, 08:07 AM
|
#1
|
Member
Registered: Mar 2012
Posts: 174
Rep:
|
I want to run firefox from SSH
Hello,
I have dedicated server and have root access via SSH. I want to use firefox browser from our server. I used this command
Code:
ssh -X root@myserver.com -p 22
Provided password and then:
Code:
# firefox &
[1] 20518
[root@myserver ~]# -bash: firefox: command not found
]# -bash: firefox: command not found
www.yahoo.com
-bash: www.yahoo.com: command not found
[1]+ Exit 127 firefox
Thanks & best regards
|
|
|
04-24-2012, 08:10 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Right, so you haven't got firefox installed..?
If you believe it is installed, then running "locate firefox" should turn up a location where the binary is found, but it really should be on your path already.
and port 22 is a default, there's no need to specify it on the command line.
Last edited by acid_kewpie; 04-24-2012 at 08:13 AM.
|
|
|
04-24-2012, 08:13 AM
|
#3
|
Member
Registered: Mar 2012
Posts: 174
Original Poster
Rep:
|
I want to run it on my computer desktop and I have it on my PC not on my dedicated server
Thanks for replying
|
|
|
04-24-2012, 08:15 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
good for you.
clearly you have to have firefox installed on the system you are trying to execute it on.
|
|
|
04-24-2012, 08:45 AM
|
#5
|
Member
Registered: Mar 2012
Posts: 174
Original Poster
Rep:
|
I followed this link to install the firefox http://www.brunolinux.com/03-Install..._in_Linux.html and it displays firefox installed
# ls
Code:
application.ini jsloader libsoftokn3.so
blocklist.xml libfreebl3.chk libssl3.so
chrome libfreebl3.so libxpcom.so
chrome.manifest libmozalloc.so libxul.so
components libmozsqlite3.so mozilla-xremote-client
crashreporter libnspr4.so omni.ja
crashreporter.ini libnss3.so platform.ini
crashreporter-override.ini libnssckbi.so plugin-container
defaults libnssdbm3.chk precomplete
dependentlibs.list libnssdbm3.so removed-files
dictionaries libnssutil3.so run-mozilla.sh
extensions libplc4.so searchplugins
firefox libplds4.so Throbber-small.gif
firefox-bin libsmime3.so updater
icons libsoftokn3.chk updater.ini
Now I tried again:
Code:
firefox]# /usr/local/bin/firefox/firefox
Error: no display specified
Last edited by Raakh5; 04-24-2012 at 08:48 AM.
|
|
|
04-24-2012, 08:49 AM
|
#6
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
right so from wherever that directory is just run "./firefox"
|
|
|
04-24-2012, 08:52 AM
|
#7
|
Member
Registered: Mar 2012
Posts: 174
Original Poster
Rep:
|
Code:
# ./firefox
Error: no display specified
[root@myserver firefox]# ./firefox www.yahoo.com
Error: no display specified
|
|
|
04-24-2012, 09:00 AM
|
#8
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
don't log into a server as root. don't run X applications as root, especially not something like a web browser, when there is no benefit ever from doing so.
For the lack of a DISPLAY setting, in my experience that tends to relate to not having the Xauthority set up correctly, and generally from not having xauth and associated libraries installed on the remote system. On CentOS / RedHat etc, this is the xorg-x11-xauth package.
|
|
1 members found this post helpful.
|
04-24-2012, 09:05 AM
|
#9
|
Member
Registered: Mar 2012
Posts: 174
Original Poster
Rep:
|
Code:
vi /etc/ssh/sshd_config
#X11Forwarding no
X11Forwarding yes
What else I can check?
Thanks for favorable replies
|
|
|
04-24-2012, 09:06 AM
|
#10
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
In addition to what acid_kewpie posted, you also have to configure your SSH server to allow X-forwarding.
EDIT: OK, I was to late with that.
|
|
|
04-24-2012, 09:09 AM
|
#11
|
Member
Registered: Mar 2012
Posts: 174
Original Poster
Rep:
|
I just checked the option in my SSH client Tunnel X11 Connections and restarted the SSH client. Now it shown the following message:
Code:
/usr/bin/xauth: creating new authority file /root/.Xauthority
# ./firefox
X connection to localhost:10.0 broken (explicit kill or server shutdown).
The application 'firefox' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.
|
|
|
04-24-2012, 09:12 AM
|
#12
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
you "checked the option"? Are you using an SSH command line or not? please clarify this... if this is PuTTY or Terraterm or suchlike on windows, then you need an X server on your local machine to use.
|
|
|
04-24-2012, 09:15 AM
|
#13
|
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983
|
http://www.linux-tip.net/cms/content/view/302/26/
this link should help setting up your X11 Forwarding. also as has been mentioned please do not log into your server running root. just ssh -X user@IP that will be plenty powerful enough to run firefox remote.
you can always use xeyes to test your X11 forwarding too. once your ssh -X is connected (AS USER) you can type xeyes and you should get a pair of eyes on your local desktop that will follow your mouse around the screen.
If that works, then your X11 Forwarding is working.
|
|
1 members found this post helpful.
|
04-24-2012, 09:15 AM
|
#14
|
Member
Registered: Mar 2012
Posts: 174
Original Poster
Rep:
|
This is SSH@ Secure Shell (TM)
Version3.2.9 (Build 283)
|
|
|
04-24-2012, 09:21 AM
|
#15
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by Raakh5
This is SSH@ Secure Shell (TM)
Version3.2.9 (Build 283)
|
This is a Windows program. To use X-forwarding you need a X-server to actually forward to. Windows doesn't have one by default, so you need to install one, for example Xming or Cygwin/X.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 09:21 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|