Re: strange rvxt behaviour
On 15 Jan 1998, Ben Pfaff wrote:
> I just upgraded to hamm and am having a peculiar problem: when I am in
> X as a user and I su to root in an rxvt terminal window, I am no loger
> able to open any rxvt terminal as a user. I get an error saying that
> rxvt cannot connect to a pseudo tty. This does not happen with xterm
> and if I log out as root everything works fine again.
>
> Root doesn't have rights to the X display because root doesn't own the
> display, the user who started the session does. A quick fix (but
> insecure) is to type `xhost +localhost' before su'ing to root. A
> better fix is to use xauth--try `man xauth' for more info.
With the default setup for X in hamm, the xhost command is useless and
should not be used.
I think it is very strange that it happens in an rxvt and not in an xterm.
Normally, I use ssh to give me an xterm where I can type commands as root.
Before I had ssh, I would su to root and then execute this script, which
I called 'getcookie':
#!/bin/sh
pushd /home/remco >/dev/null
if [ X$DISPLAY = X ]
then
DISPLAY=:0
fi
su remco -c "/usr/bin/X11/xauth nlist $DISPLAY" | /usr/bin/X11/xauth nmerge -
popd >/dev/null
Here, `remco' is my own username. Substitute it with yours. The pushd/popd
commands are to make sure the commands executed by su have a readable
'current working directory' (/root has permissions 0700 on my system).
Remco
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: