Xserver in fedora 17, displaying from remote server.
I'm working on switching from win* to linux as my desktop at work. The only thing I'm struggling with is how I get a servers display to mine. I'd run Xserver client in win*, from cmdline of linux server, I'd export the display to my desktop and launch away.
There is -X in ssh but I find it not working after several jump boxes. I find articles to modify the Xaccess file, but I'm not finding that. I have x11-server (and other x11-packages), gdm and Xdmcp installed. Am I just missing a package or did something change from the days of Xaccess settings? I'd prefer to continue with the method of setting access restrictions since it's now an open port, if not start/stop a service for when required. I'd like to continue to set the display on the remote machine for sending displays back. I just feel I'm missing something that I'm not terming right for google/LQ. Thanks.. |
-X pretty much works for me.
Try ssh with -Y then running the remote program from the shell prompt as you would locally. Does that work? Not a permanent solution, but something to try. |
As goumba said, it should be very straight forward:
Code:
$ ssh -Y server |
It doesn't when I ssh from server to server. I use -X on each one and it's not following the pathway back. I do the same thing on a win* VM and export display and it works using mochaX. I'm sure it's possible, but I can't find any Xaccess file on my fedora or how to make it to say, listen for inbound.
Thanks. |
I don't know what this Xaccess file is that you're looking for, is this something you had to use before? I've never seen or touched that file on my systems.
Code:
$ \ssh -X server3 Could you use ssh -v to print more debugging output? What are the error messages you get when you try to launch an X application? Perhaps you placed something in your shell startup scripts to hard-code the DISPLAY for your previous win client? |
Thanks for all the help, just wanted to say that first of all.
The Xaccess I'm talking about, I'm several references such as http://www.cyberciti.biz/faq/howto-l...via-the-xdmcp/. If verbose ssh helps, I'll run that. Here's the quick snip-it without. Code:
[mmcc0912@desktop ~]$ ssh -X me@ogismgmt1.domain.com Thanks. |
Ok, I misread your initial question, missing the fact you're ssh-ing from one point to another.
I just tried it here, and don't have a solution, but got a slightly different message: Code:
root@serenity:~# emacs /etc/ssh/ssh_config Did you try doing the same using -Y instead of -X, just to see if it works? |
I did, but it doesn't make a difference.
Code:
# xclock Code:
# netstat -an |grep ':600' Code:
[root@desktop ~]# netstat -an |grep ':600' Thanks for the attention to my post. I appreciate it. I've been googling it for some time and just haven't found the how do I make X listen that's applicable. |
Check the /etc/ssh/sshd_config. There should be a line in it (usually commented out):
#X11Forwarding no This indicates that the default does not allow X windows to be forwarded to the remote user. Uncomment (or duplicate the line, and uncomment) the line and change the "no" to "yes". Restart the sshd server and you should be good to go. |
Interesting, on my installation that comes set as yes as default.
I had missed that before, mmcc0912 in your case you're going to have to check the server config on every server along the way. Only one server having that set to "no" or commented out somewhere is going to stop you. |
In my system (Fedora 16 currently) it seems to show the default. But as it is a simple text file, it can show anything it wants. The only way to be sure (if it doesn't work) is to set it to "yes".
|
I should rephrase that. On an untouched Debian install of openssh-server, the line is uncommented and explicitly states
Code:
X11Forwarding yes |
sshd creates the X forwarding by opening a TCP port (6000+offset specified from sshd config file+increment to find unused port). That port is then passed to the X clients using the DISPLAY environment variable (value is localhost:<port-6000>.0). Any other value causes an access failure due to improper credentials.
The usual offset value is 10, to skip a possible 10 locally based TCP X servers. The first port used by sshd should then be 6010... with an increment of one for each sshd that may be forwarding that users X applications. The display environment value should be "localhost:10.0" for the first ssh login forwarding windows. 11.0 for the second. The credentials should be shown by a "xauth list", one for each key. If you are logged in remotely, with X forwarding there would normally be only one key. It is possible to get multiple keys... just login a second time through another ssh login... The fact that you have a DISPLAY value of other than localhost:10.0 (or 127.0.0.1:10.0) implies that some login script is forcing the environment value to a wrong number. DISPLAY is one of the few variables that should not be modified except for extremely good reasons - usually related to testing. |
I appreciate the responses, I can forward from the server to a windows host running an Xserver (mochaX). I can't find jack on how to enable Xserver in fedora to listen so that I can send the display back to my fedora box. Well, what I do find doesn't fit the system, the files it says to modify don't exist... Either something has changed, or I don't have the right packages installed, IMHO.
Right now I'm using mochaX in a TS/rdesktop session in windows. But my desktop has several monitors and it's just a functional thing to me that I should be able to send it directly to my desktop (Linux to Linux vs. Linux to Windoze). Thanks. |
Quote:
As both myself and jpollard pointed out, your DISPLAY environment variable does not look correct. Are you SURE that you didn't hard-code anything in your log in scripts on the remote servers to force DISPLAY to some non-default value? |
All times are GMT -5. The time now is 02:52 AM. |