LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-23-2004, 08:11 PM   #1
bbresc512
LQ Newbie
 
Registered: Apr 2004
Posts: 10

Rep: Reputation: 0
running GUI applications on remote client


Hi
I'm new to Linux. Trying to understand how to run GUI applications on the remote client. Here is what I'm trying to do:

on remote client
1. xhost +
2. ssh 192.168.0.10

inside ssh
1. export DISPLAY=192.168.0.1:0.0 (the remote client ip is 192.168.0.1)
2. xclock

then I'm getting:
Error: Can't open display 192.168.0.1:0.0

Am I missing something?
Thanks in advance
 
Old 04-23-2004, 09:02 PM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Yeah, if you're using ssh you don't need to do the whole xhost + and export DISPLAY thing.

Just make sure that X11Forwarding is on, that would be sshd_config. There may be one other thing, but I can't recall off the top of my head, but the sshd_config is a good place to start.
 
Old 04-23-2004, 09:40 PM   #3
lnxconvrt
Member
 
Registered: Mar 2002
Location: Houston
Distribution: FC3, Manrake 10.x, various others at times
Posts: 113

Rep: Reputation: 18
Technoslave has the answer...

Uncomment and change the X11 forwarding line in /etc/sshd_config to "yes". Then do a kill -HUP on the process number of the sshd daemon to make it re-read the config file.

The export display thing doesn't seem to work for me -- I think that it tries to send the X display to port 6000 and it's not allowed by default. Editing the sshd_config file (on 192.168.0.10) forwards the X display over the ssh connection on port 22 and ssh handles the permissions to write to the remote client's display.

That should do it.
 
Old 04-24-2004, 07:44 AM   #4
bbresc512
LQ Newbie
 
Registered: Apr 2004
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks guys. The X11Forwarding parameter has solved the problem.
Actually the ssh was my second try. First I tried using telnet and I got a similar error. Something like "cannot connect to x server".

Is it doable by telnet?

Thanks again.
 
Old 04-24-2004, 02:24 PM   #5
lnxconvrt
Member
 
Registered: Mar 2002
Location: Houston
Distribution: FC3, Manrake 10.x, various others at times
Posts: 113

Rep: Reputation: 18
Quote:
Originally posted by bbresc512
Thanks guys. The X11Forwarding parameter has solved the problem.
Glad it helped.

Quote:
Is it doable by telnet?
Probably. Best guess is you'd have to enable it in some security settings related to the display, but I'm not sure which, or why "xhost+..." doesn't do it.
 
Old 04-24-2004, 03:13 PM   #6
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Yeah, to do it via telnet on the box you're telneting from you have to issue an xhost + hostname. Then on the host you're on, assuming bash is your shell, you have to issue an "export DISPLAY=hostname.coming.from:0.0"

From there it should work. However, ssh is your best bet in just about every way.
 
Old 04-25-2004, 07:39 AM   #7
bbresc512
LQ Newbie
 
Registered: Apr 2004
Posts: 10

Original Poster
Rep: Reputation: 0
It's not that simple as I hoped, still something is missing. I have Linux computers, one with 8.0 and one with 9.0. The X11Forwarding parameter worked for 8.0 but didn't work for 9.0. I get "cannot connect to x server" on the 9.0. I thought the xhost + might help, but when I run it on the 9.0 I get:
xhost: unable to open display ""

Please help
 
Old 04-25-2004, 07:52 AM   #8
bbresc512
LQ Newbie
 
Registered: Apr 2004
Posts: 10

Original Poster
Rep: Reputation: 0
sorry I was to prompt posting the previous message. Here it is with a few corrections:

It's not that simple as I hoped, still something is missing. I have 2 Linux computers, one with Redhat 8.0 and one with Redhat 9.0. The X11Forwarding parameter worked for 8.0 but didn't work for 9.0. I get "cannot connect to x server" on the 9.0. I thought the xhost + might help, but when I run it on the 9.0 I get:
xhost: unable to open display ""

Please help
 
Old 04-25-2004, 09:05 AM   #9
bbresc512
LQ Newbie
 
Registered: Apr 2004
Posts: 10

Original Poster
Rep: Reputation: 0
Is there any way to verify that the X server is running properly? Is it a service? If yes can I use service ... status command?

If my questions are too trivial please direct me to the relevant documentation. I couldn't find anything so far.
 
Old 04-25-2004, 05:59 PM   #10
lnxconvrt
Member
 
Registered: Mar 2002
Location: Houston
Distribution: FC3, Manrake 10.x, various others at times
Posts: 113

Rep: Reputation: 18
The xserver runs on the local machine where you want to see the graphical output. So, if you ssh from machine A to machine B and start a GUI application then the xserver in question is on machine B. It seems backwards, but the remote server that you ssh'd to acts as the client and the local machine that you ssh'd from acts as the server as far as the graphical display is concerned.

So, if you have a gui running on the remote client that you've ssh'd from (such as KDE or Gnome desktop), then the xserver is running.

Just to make certain, the sshd_config file that needs to be edited to allow ssh forwarding is the one on the machine that you ssh to.

I don't know why you'd have problems forwarding X over RH 9 box and not RH8. I don't think that anything changed between those RH versions; I have no trouble forwarding X from Fedora (which might be thought of as RH 10).
 
  


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
Remote applications nderitualex Fedora 1 10-28-2005 05:14 AM
Remote applications nderitualex Linux - Newbie 2 10-28-2005 04:03 AM
running X applications on remote machine when logged in via ssh servnov Linux - General 1 08-15-2005 08:53 PM
need help running remote X applications zero79 Debian 5 06-11-2005 09:55 PM
running remote gui programs w/ X steyr Slackware 7 01-11-2004 07:11 PM


All times are GMT -5. The time now is 07:38 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration