LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
Search this Thread
Old 09-26-2009, 06:57 AM   #1
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy jessie
Posts: 1,433

Rep: Reputation: 83
X11 forwarding problem over ssh. Where DISPLAY is set?


Hya,

I have four Debian penguins, (3 squeeze, 1 etch).

One of them does not forward X11 to other over ssh. (saying that DISPLAY is not set) This one can be forwarded by other.

ssh_config and sshd_config say that X11forwarding is yes.

ssh -vvv user@non.behaving.penguin indicates that DISPLAY is not set.

At this moment, I am trying to figure out which program (daemon, script or whatever) sets DISPLAY.

So far, I have reinstalled openssh-server, ssh using aptitude.

Does anybody know how to proceed?

Any suggestions will be appreciated.

Happy Penguins!
 
Old 09-26-2009, 03:13 PM   #2
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 128Reputation: 128
Append the before your command:

DISPLAY=:0 <yourcomamnd>

If it does not work, then it is because the feature is disabled, like in Ubuntu. It is not hard to enable again, but I don't remember how I did it.
 
Old 09-26-2009, 04:20 PM   #3
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
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.

http://csociety.ecn.purdue.edu/~sigo...rding/#X11-how
 
Old 09-27-2009, 05:32 AM   #4
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy jessie
Posts: 1,433

Original Poster
Rep: Reputation: 83
Hya,

Thanks, Elv13 and rjlee.

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
 
  


Reply

Tags
display, ssh, x11forwarding


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
X11 over SSH: $DISPLAY not being set Dria Linux - Networking 4 10-25-2010 01:47 PM
Need help forwarding X11 via SSH buckwheat12 Linux - Networking 15 05-02-2007 03:08 PM
X11 forwarding with ssh rhermsen Slackware 2 10-27-2006 01:49 PM
Need HELP SSH X11 Forwarding wylie1001 Linux - Software 2 04-11-2006 08:12 PM
X11 forwarding over SSH SirSlappy Linux - Networking 1 10-18-2005 01:37 PM


All times are GMT -5. The time now is 10:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration