This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Remote tasks sleeping after 'su'


On Thu, 24 Jan 2002, Harold Hunt wrote:

>
> > -----Original Message-----
> > From: cygwin-xfree-owner@cygwin.com
> > [mailto:cygwin-xfree-owner@cygwin.com]On Behalf Of Rob Haines
> > Sent: Thursday, January 24, 2002 12:32 PM
> > Subject: Remote tasks sleeping after 'su'
> >
> > I've been using Cygwin for a while now but am new to cygwin-xfree. I hope
> > this question hasn't been answered before but I did check the archives and
> > didn't find anything pertinent.
> >
> > I use this system to log into other systems (via ssh -X) and have the
> > windows displayed on my cygwin-xfree desktop. If I run something as myself
> > then everything is fine. If I log in, then 'su' to root, then run
> > something
> > the window never appears. If I look at 'top' then the task I just
> > started is
> > flagged as sleeping. This problem does not occur when using the
> > putty/exceed

Do you use *any* access limitations with exceed?

IIRC its default is to leave the display totally open. This allows anybody
in the neighbourhood to sniff characters from your display (xwd -display
<some other display> is one silly way), characters you type (like the root
password of the su command) and even inject characters.

> > combination to log in to my remote machine. I haven't tried
> > logging straight
> > in as root, because our security policy does not allow it. Is this a
> > cygwin-xfree issue, or something else?
> >
> Rob,

does 'ssh -v -X' give a better clue?

What version of ssh do you have on the remote machine?

Check your definitions of DISPLAY. If you connect to x-server-host to
other-system, then DISPLAY should be set to something like
other-machine:10.0

Try launching a simple X client, like xcalc. I believe that those simple
programs tend to be netter at reporting X protocol errors than many other
programs.

>
> What you describe sounds logical.Remember, it is your username, not root,
> that has setup the X tunnelling through ssh.Therefore, it makes sense that
> an X client launched by root would not display.
>
> I'm not a great X user, so I could be wrong... but I do think that the above
> makes sense.

Some linux distros (e.g.: my mandrake 8.1) come with a pam module
(pam_xauth) that forwards the definition of DISPLAY and the XAUTHORITY  to
the user you are becoming (or only to root?)

Also, maybe the following voodoo would work:

su -c "env DISPLAY=${DISPLAY} XAUTHORITY=${HOME}/.Xauthority $SHELL" -

(Runs a shell as root, with DISPLAY set to the original value of DISPLAY,
and XAUTHORITY set to the user's XAUTHORITY file . As root, you can read
it)

-- 
Tzafrir Cohen                        /"\
mailto:tzafrir@technion.ac.il        \ /  ASCII Ribbon Campaign
Taub 229, 972-4-829-3942,             X   Against  HTML  Mail
http://www.technion.ac.il/~tzafrir   / \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]