LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   running GUI applications on remote client (http://www.linuxquestions.org/questions/linux-networking-3/running-gui-applications-on-remote-client-173869/)

bbresc512 04-23-2004 08:11 PM

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

Technoslave 04-23-2004 09:02 PM

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.

lnxconvrt 04-23-2004 09:40 PM

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.

bbresc512 04-24-2004 07:44 AM

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.

lnxconvrt 04-24-2004 02:24 PM

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.

Technoslave 04-24-2004 03:13 PM

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.

bbresc512 04-25-2004 07:39 AM

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

bbresc512 04-25-2004 07:52 AM

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

bbresc512 04-25-2004 09:05 AM

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.

lnxconvrt 04-25-2004 05:59 PM

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).


All times are GMT -5. The time now is 05:25 AM.