2010-02-18

How to create a screen shot of the GDM login screen on Ubuntu Hardy

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.

  1. Install ImageMagick for the image file format conversion below:
    $ sudo apt-get install imagemagick
  2. Create a helper script:
    $ echo 'DISPLAY=:0 XAUTHORITY=/var/lib/gdm/:0.Xauth xwd -root' >/tmp/shot.sh
  3. Make sure your login screen is active (log out or reboot the machine, and wait until you see the login screen).
  4. Log in in text mode (by pressing Ctrl-Alt-F1), or using SSH.
  5. Create the screen shot by running
    $ sudo bash /tmp/shot.sh >/tmp/shot.xwd
  6. You can log in now (by pressing Ctrl-AltF7 first to get back to the GDM login screen).
  7. 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
  8. View the screen shot in your favourite image viewer.

No comments:

Post a Comment