View previous topic :: View next topic |
Author |
Message |
mathfeel l33t
Joined: 03 Aug 2004 Posts: 700
|
Posted: Fri Sep 30, 2005 7:42 am Post subject: using DISPLAY |
|
|
I ssh into a school unix server and then use DISPLAY to run x program from it.
I did the following with cygwin/X in Windows:
xhost serverhostname
(slogin into serverhostname)
export DISPLAY=myip:0.0
xclock
and it just worked--of course, I also opened port 6000 on my router...
I repeated the same process in gentoo and xclock gives me an error:
Error: Can't open display: 71.136.272.37:0.0
What's going on and how can I figure out why is xclock not talking to my xserver here... _________________ -----------------------------------------------------------
"In heaven all the interesting people are missing"
-- Friedrich Nietzsche |
|
Back to top |
|
|
drowningman n00b
Joined: 03 Feb 2004 Posts: 25 Location: Montreal
|
Posted: Fri Sep 30, 2005 10:53 am Post subject: |
|
|
You might want to use the -X option for SSH in order to avoid having to change DISPLAY manually:
Code: |
#ssh -X you@yourserver.com
#xclock
|
For this to work, you'll have to make sure that your firewall is not bocking port 6000 on your gentoo box. To test whether the Linux firewall iptables is causing the problem, become root and shut it down temporally and then try SSH'ing:
Code: |
# su
#/etc/init.d/iptables stop
|
If X forwarding works after this step, you know you'll have to edit your iptables script. Otherwise, make sure your tcpwrappers are not the problem (/etc/hosts.allow and /etc/hosts.deny) and that the SSH daemon's configuration file on the server allows you to forward X sessions.
Hope that helps. _________________ "Don't talk of worlds that never were
The end is all that's ever true
There's nothing you can ever say
Nothing you can ever do... "
- The Cure |
|
Back to top |
|
|
mathfeel l33t
Joined: 03 Aug 2004 Posts: 700
|
Posted: Sat Oct 01, 2005 1:28 am Post subject: |
|
|
drowningman wrote: | You might want to use the -X option for SSH in order to avoid having to change DISPLAY manually:
Code: |
#ssh -X you@yourserver.com
#xclock
|
|
Code: | ssh -X malibu.ucsd.edu
muser@malibu.ucsd.edu's password:
/usr/X11R6/bin/xauth: unable to link authority file /Network/Servers/physics-file.ucsd.edu/Volumes/export/home/muser/.Xauthority, use /Network/Servers/physics-file.ucsd.edu/Volumes/export/home/muser/.Xauthority-n
|
I am not running any firewall in gentoo, and it shouldn't be problem with network firewall caz my Windows boot works just fine (cygwin/X).
Besides, isn't there a different between ssh -X hostname than ssh into host then telling it which Xserver to use? I want to run matlab through the connection, so don't want any possible performance degradation in display... _________________ -----------------------------------------------------------
"In heaven all the interesting people are missing"
-- Friedrich Nietzsche |
|
Back to top |
|
|
mathfeel l33t
Joined: 03 Aug 2004 Posts: 700
|
Posted: Mon Oct 03, 2005 8:40 pm Post subject: |
|
|
drowningman wrote: |
If X forwarding works after this step, you know you'll have to edit your iptables script. Otherwise, make sure your tcpwrappers are not the problem (/etc/hosts.allow and /etc/hosts.deny) and that the SSH daemon's configuration file on the server allows you to forward X sessions.
Hope that helps. |
I don't have iptables installed.
for some reason, I don't have the two files u mentioned.
And, how do I make sure the last part?
btw, ssh -X works, but I wonders if it's equivalent to manually setting DISPLAY? _________________ -----------------------------------------------------------
"In heaven all the interesting people are missing"
-- Friedrich Nietzsche |
|
Back to top |
|
|
drowningman n00b
Joined: 03 Feb 2004 Posts: 25 Location: Montreal
|
Posted: Mon Oct 10, 2005 7:19 pm Post subject: |
|
|
Look for the following line in your server's sshd configuration file (located at /etc/ssh/sshd_config):
That should get you going. As to why you do not have tcpwrappers (i.e. /etc/hosts.[allow|deny]), I have no idea. As to the quality of ssh -X vs. setting $DISPLAY, I believe they are equivalent, but could be wrong. I've never noticed a degradation in the quality while using ssh -X. _________________ "Don't talk of worlds that never were
The end is all that's ever true
There's nothing you can ever say
Nothing you can ever do... "
- The Cure |
|
Back to top |
|
|
|