Taking snapshot of login screen on Mint 13, Mate, Lightdm

I am running lightdm-gtk greeter. I found the default greeter (unity-greeter) didn't give the flexibility I wanted. I wanted to generate a document for people wanting to use this computer when I wasn't there and so wanted a screen shot of the login screen. This is the way I did it. I'm sure it's not the only way and maybe not the best way, but it worked.

Generate a script, greet.sh and make it executable:

cat << 'EOF' > /tmp/greet.sh
#!/bin/bash
/usr/bin/mate-screenshot -d 5 &
EOF
chmod +x /tmp/greet.sh

Now edit /etc/lightdm/lightdm.conf, mine looks like:

[SeatDefaults]
#greeter-session=unity-greeter
greeter-session=lightdm-gtk-greeter
user-session=gnome-shell
greeter-setup-script=/tmp/greet.sh

The only change I made was to add the "greeter-setup" line. Now execute:

nohup /etc/init.d/lightdm restart &

Warning, once you do that you will be immediately logged out, so make sure you save anything you were working on. After about 5 seconds you'll see the familiar save screen shot display.

Note that I was unable to change the file name from Screenshot.png for some reason, but I was able to save it in a different directory from the default. After you log back in, don't forget to remove the "greeter-setup" line from the conf file. Note that this only works for lightdm, it won't work for mdm. I didn't test it on others but it should also work for any valid greeter.