Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'X Login via XDMCP over an SSH tunnel' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
X Login via XDMCP over an SSH tunnel
Authored by: joshewah on Nov 19, '04 01:27:45PM
You can also run specific apps as needed like xterm or firefox etcl. that reside on the host machine instead of running the entire X session by using those commands instead of Xnest.

One snag I have run into is if you echo $DISPLAY from it returns nothing even if you set $DISPLAY to :0.0 like it should be. You will get something like "xterm Xt error: Can't open display: " from the remote machine. You can get around this one of two ways.

1. Add `DISPLAY=:0.0` before the ssh command. Example: DISPLAY=:0.0 ssh

2. Run ssh from within X11's xterm.

If somebody could fill me in on the difference between how and X11's xterm starts up environment wise that explains why this is happening that would be great :)

[ Reply to This | # ]
X Login via XDMCP over an SSH tunnel
Authored by: EddEdmondson on Nov 19, '04 07:07:11PM
Only children of will get the DISPLAY variable passed down to it. won't because it isn't a descendent of the

Two solutions:
1) Use to open the terminal process - either using 'open -a Terminal' from an xterm or perhaps from the menu. Then it will correctly inherit the DISPLAY setting. must not be running already when you do this however.
2) Use a suitable script to determine the DISPLAY variable correctly.

Do not set DISPLAY to :0.0 manually or in a script. There is no guarantee that that is the correct value. It can be higher if there is already a lower-numbered X-server running on the machine. Example: start then fast-user-switch to another user and start there too. The second user will have DISPLAY of :1.0 instead.

[ Reply to This | # ]