I had a similar problem :) Here's what I would do: 1) xauth has to be available on the system you ssh to 2) delete/clean your .Xauthority files on your target system 2) there are 2! ways to foreward your X connection *ssh -X|Y* in my case it was -Y which did the trick. With -X I got some weird authentication failure. Look into man ssh for the specific difference in -X|-Y.
Hope some of this helps :) Christian Fargusson.Alan schrieb am 01.02.2008 20:53: > There are two problems here. > > First: doing a "sudo echo $DISPLAY" does not echo the DISPLAY that sudo is > using. The shell will replace the $DISPLAY before starting the sudo command. > > Second: DISPLAY=localhost can't work. I don't see how xclock can be working. > > -----Original Message----- > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of Kim > Goldenberg > Sent: Friday, February 01, 2008 11:48 AM > To: [email protected] > Subject: Re: SLES10 ssh X Forwarding > > > Edmund R. MacKenty wrote: >> On Friday 01 February 2008 13:53, Kim Goldenberg wrote: >> >>> Mark - I still get "Gtk-WARNING **: cannot open display: " with a "sudo >>> gedit foo" command that works when I use "gedit foo". >>> >> If you pasted the entire error message here, then it looks like the DISPLAY >> variable is not set in your environment. Is that the case? Of course, you >> could have just left of the display number at the end of the message... >> >> I always try to run a very basic X-Windows command to see if authentication >> is >> working: xclock. If you can't run xclock, then you have either a display >> specification problem or an X authentication problem. The first thing is to >> make sure DISPLAY is set on your remote system >> to "<hostname>:<display>.<screen>", where "<hostname>" is the name of your >> local X server system (resolvable from the remote system), and <display> and >> <screen> are usually zero. >> - MacK. >> > MacK - No, that's the whole error message. I got the same ideas as you, > but as you can see below, that does not seem to be the case. xclock > works from the non-root user, but not under sudo. > > [EMAIL PROTECTED]:~> echo $DISPLAY > localhost:10.0 > [EMAIL PROTECTED]:~> sudo echo $DISPLAY > localhost:10.0 > [EMAIL PROTECTED]:~> su > Password: > lnxb0003:/home/otsgold # echo $DISPLAY > localhost:10.0 > lnxb0003:/home/otsgold # uname -a > Linux lnxb0003 2.6.16.54-0.2.3-default #1 SMP Thu Nov 22 18:32:07 UTC > 2007 s390x s390x s390x GNU/Linux > lnxb0003:/home/otsgold # cat /etc/SuSE-release > SUSE Linux Enterprise Server 10 (s390x) > VERSION = 10 > PATCHLEVEL = 1 > lnxb0003:/home/otsgold # > > -- > Kim Goldenberg > Systems Programmer I > State of NJ - OIT > 609-777-3722 > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > > ________________________________________________________________________________________________________________ > > CONFIDENTIALITY NOTICE: This email from the State of California is for the > sole use of the intended recipient and may contain confidential and > privileged information. Any unauthorized review or use, including disclosure > or distribution, is prohibited. If you are not the intended recipient, > please contact the sender and destroy all copies of this email. > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 -- Christian Langer |Zentrum für Informationsverarbeitung | und Informationstechnik |Haus I Raum 339 |An der Kueppe 2 |53225 Bonn |Mail: [EMAIL PROTECTED] |Tel: 0228 99680 5199 ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
signature.asc
Description: OpenPGP digital signature
