Actually, it has to be "localhost"; ssh is tunneling the connection, and
localhost:10 is the display it sets up to catch the information and tunnel
it back to the client end of ssh for actual display. There's nothing wrong
with it being "localhost", so this isn't a symptom of the problem at hand.

--
   .~.    Robert P. Nix             Mayo Foundation
   /V\    RO-OE-5-55                200 First Street SW
  /( )\   507-284-0844              Rochester, MN 55905
  ^^-^^   -----
        "In theory, theory and practice are the same, but
         in practice, theory and practice are different."




On 2/1/08 1:53 PM, "Fargusson.Alan" <[EMAIL PROTECTED]> wrote:

> 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: LINUX-390@VM.MARIST.EDU
> 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

----------------------------------------------------------------------
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

Reply via email to