This blog pts explains how to create a screen shot of the currently running X11 GDM login screen (the graphics login screen at system startup) on Ubuntu Hardy.
- Install ImageMagick for the image file format conversion below:
$ sudo apt-get install imagemagick
- Create a helper script:
$ echo 'DISPLAY=:0 XAUTHORITY=/var/lib/gdm/:0.Xauth xwd -root' >/tmp/shot.sh
- Make sure your login screen is active (log out or reboot the machine, and wait until you see the login screen).
- Log in in text mode (by pressing Ctrl-Alt-F1), or using SSH.
- Create the screen shot by running
$ sudo bash /tmp/shot.sh >/tmp/shot.xwd
- You can log in now (by pressing Ctrl-AltF7 first to get back to the GDM login screen).
- Convert the screen shot to JPEG and/or PNG:
$ convert -quality 50 /tmp/shot.xwd /tmp/shot.jpg $ convert /tmp/shot.xwd /tmp/shot.png
- View the screen shot in your favourite image viewer.