LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-24-2012, 08:07 AM   #1
Raakh5
Member
 
Registered: Mar 2012
Posts: 174

Rep: Reputation: Disabled
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
 
Old 04-24-2012, 08:10 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 04-24-2012, 08:13 AM   #3
Raakh5
Member
 
Registered: Mar 2012
Posts: 174

Original Poster
Rep: Reputation: Disabled
I want to run it on my computer desktop and I have it on my PC not on my dedicated server

Thanks for replying
 
Old 04-24-2012, 08:15 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
good for you.

clearly you have to have firefox installed on the system you are trying to execute it on.
 
Old 04-24-2012, 08:45 AM   #5
Raakh5
Member
 
Registered: Mar 2012
Posts: 174

Original Poster
Rep: Reputation: Disabled
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.
 
Old 04-24-2012, 08:49 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
right so from wherever that directory is just run "./firefox"
 
Old 04-24-2012, 08:52 AM   #7
Raakh5
Member
 
Registered: Mar 2012
Posts: 174

Original Poster
Rep: Reputation: Disabled
Code:
# ./firefox
Error: no display specified
[root@myserver firefox]# ./firefox www.yahoo.com
Error: no display specified
 
Old 04-24-2012, 09:00 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
Old 04-24-2012, 09:05 AM   #9
Raakh5
Member
 
Registered: Mar 2012
Posts: 174

Original Poster
Rep: Reputation: Disabled
Code:
vi /etc/ssh/sshd_config
#X11Forwarding no
X11Forwarding yes
What else I can check?

Thanks for favorable replies
 
Old 04-24-2012, 09:06 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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.
 
Old 04-24-2012, 09:09 AM   #11
Raakh5
Member
 
Registered: Mar 2012
Posts: 174

Original Poster
Rep: Reputation: Disabled
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.
 
Old 04-24-2012, 09:12 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 04-24-2012, 09:15 AM   #13
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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.
Old 04-24-2012, 09:15 AM   #14
Raakh5
Member
 
Registered: Mar 2012
Posts: 174

Original Poster
Rep: Reputation: Disabled
This is SSH@ Secure Shell (TM)
Version3.2.9 (Build 283)
 
Old 04-24-2012, 09:21 AM   #15
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Raakh5 View Post
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.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
firefox doesn't show up properly when run remotely through ssh -Y nass Slackware 12 04-06-2012 11:09 AM
How can I SSH with Firefox? SimbaSpirit Linux - Software 6 07-04-2008 11:28 PM
Firefox didn't run after Firefox 2 installation nightrider Linux - Newbie 15 04-03-2008 11:24 PM
How to run a program in an ssh session that will run after you close out the session? dr_zayus69 Linux - Networking 5 03-05-2006 08:15 PM
I Cant Run The New Firefox ziggi Linux - Newbie 2 06-12-2005 12:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration