[KLUG Members] Screenshot of Login Dialogue

Peter Buxton members@kalamazoolinux.org
Wed, 25 Sep 2002 08:42:18 -0400


On Tue, Sep 24, 2002 at 05:16:33PM -0400, Buist Justin wrote:

> 1)  I made sure that X was listening on tcp first.  If you've got an
> "-nolisten tcp" being passed to X from gdm/xdm/kdm.conf then you might
> need to modify this and restart gdm/xdm/kdm.

Not on the same machine. If you ssh into the target X server box, say,
all you need to do is set $DISPLAY or specify it on the command line.

> 3)  cp /var/lib/gdm/\:0.Xauth ~/.Xauthority 

This is the important step.

> 4) xwd | convert xpm:- jpg:login.jpg 

I used 'import -display :0.0 root.jpeg'.

> 5)  alt+f7 back to the X session and mouse-click on the root window.
> I did try xwd -root | convert xpm:- jpg:login.jpg but that didn't want
> to fly.  I got one garbled looking image from it.  I have no
> explanation for that.

Same here with import. You have to have X showing on the virtual console
(as you must with a mouse grab) before screen grabs work. *This* is
intriguing.

Now I must try it over ssh, while X is showing on tty7.

Yup. 'import -window root -display :0.0 root.jpg' worked fine. The X
screen you wish to grab *must* be active. Not sure why.

> I very well might have "improperly" given myself permissions to
> connect to the X server, but it works.

Since you need to be root to copy (x|k|g)dm's magic cookie, you haven't
done anything root couldn't do, anyway.

-- 
http://www.killdevil.org/~peter
Not playing Elvis Costello isn't as good
as not playing Bob Dylan. -- lsg