[SOLVED] X11 forwarding problem over ssh. Where DISPLAY is set?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
kaz2100, it's sshd (server-side, ie the machine you connect into) that actually sets the DISPLAY variable. It allocates a fake X server on the server, and forwards connections through ssh (client-side, the machine you connect from). ssh then looks up its own DISPLAY variable to work out where to send connections to (so ssh must be run from a GUI terminal, or otherwise with DISPLAY set).
There's also some magic with xauth for authentication.
Setting DISPLAY suggested by Elv13 did not work. I tried many different possibilities (:0, localhost:10.0 ....)
Then as suggested by rjlee, I just followed how sshd works. I was not quite sure if it was behaving right. For some reason, I tried to ssh to same machine (on non-behaving penguin), which did not work. (again, ssh -vvv was not helpful)
Just hoping something is wrong with network connection, I went to weed out everything out of dmesg and /var/log/whatever/files. Then I found that udev renamed wlan0 to ath0, even no madwifi was used any more. (My memory says that the node ath0 is made by wlanconfig, which is included in madwifi.) Next thing I did was to remove /etc/udev/rules.d/70-persistent-net.rules (content follows.)
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:16:e3:00:01:01", ATTR{type}=="1", NAME="ath0"
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:16:d4:22:11:22", NAME="eth0"
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:a0:d1:22:11:22", NAME="eth1"
# PCI device 0x168c:0x001a (ath_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:16:e3:00:01:02", ATTR{type}=="1", NAME="ath1"
Then reinstall udev again by aptitude, followed by reboot. BINGO! Healthy Penguin!!
For information, working udev rule looks like:
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:d4:22:11:22", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x168c:0x001c (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:e3:00:01:01", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
I am not sure what happened behind this at all, but it is working now.
Happy Penguins!
Last edited by kaz2100; 09-27-2009 at 05:34 AM.
Reason: typo
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.