How can I take a screenshot of the login screen?
This blog might be helpful: http://ptspts.blogspot.com/2010/02/how-to-create-screen-shot-of-gdm-login.html
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.
For 11.10 and Lightdm and later
You can try running unity-greeter --test-mode
in a terminal. It displays the login screen within the session. You can then take a screenshot of the login screen like you normally do with any other application.
You can try this:
gnome-screenshot -d 10
you don't need to install any thing just enter the command and lock the screen, the screen will be shot within 10 seconds after the command is executed.
Even more .. the command will lock the screen , copy the screenshot to clipboard and unlock the screen again. All by it self.
gnome-screensaver-command -l && sleep 2 && gnome-screenshot -c && loginctl unlock-session