I have a bug on my auto-log-in which is only shown When I log in the first time. There for I need a way to take a screenshot of my log-in screen when I start up.

I know about this question, but the bug doesn't appear when I log out.

This is the bug that I want a screenshot for.

I could take a real picture but my camera is very old and not that good really...

  • I know you want to close this as a dupe, but I can't login run the script and log out, my bug only appears on startup. – Alvar Jun 26 '11 at 9:40
  • At the login screen press the keys 'Ctrl + ALT + F1'. Login with your username and password, and then you'll have a terminal like prompt. and enter this: export DISPLAY=:0.0; sudo -u gdm gnome-screenshot-tool. Press 'Ctrl + ALT + F7' and a new window should popup alowing u to take a screenshot. Let me know if this works for you so I can add it as an answer – kicsyromy Jun 26 '11 at 11:43
  • try it and make shore it works, then post is as an answer! :) – Alvar Jun 26 '11 at 18:07
  • i cant im having some trouble with my pc and i cant run ubuntu :( im stuck on windows – kicsyromy Jun 26 '11 at 20:32
  • a reinstall doesn't take too long :) – Alvar Jun 26 '11 at 23:11

Modify the file /etc/gdm/Init/Default, by adding the following line

(sleep 10; gnome-screenshot) &

just before the last exit 0 line. Then logout and wait 10 seconds for the interactive screenshot dialog to appear.

It propose the /tmp directory to save the image, in any case take attention to where you save the file, to found it later, after login.

Remember to remove the line inserted in the file /etc/gdm/Init/Default to remove this annoying screenshot dialog every time you login :)

| improve this answer | |
  • 1
    I said "logout", because that's the minimum requirement, but obviously it should work even if you reboot your machine. It stay there every time you see the login windows until you go back to the origina Default file. – enzotib Jun 26 '11 at 13:24
  • nice one enzotib :-) – Rinzwind Jun 26 '11 at 13:32
  • @Rinzwind: thanks :) it took long to find because I was stuck trying with gdm-screenshot that always gives me a blank image. – enzotib Jun 26 '11 at 13:37
  • that works, but there is one problem, the picture is root owned so I can't edit it with like shutter or so. how can I make it "normal"? – Alvar Jun 26 '11 at 14:26
  • @Alvar: simply sudo chown $USER:$USER /tmp/Screenshot.png, or whatever it is named. Also, if it's you that downvoted, please undo that. – enzotib Jun 26 '11 at 14:29

I hope that someone will give you a more simple answer, since I don't know how to do it in a less cumbersome way.
If the bug is reproducible on any machines, you could make a virtual machine with Virtualbox or whichever VMmanager you like, and then simply make a screenshot.
I know it sounds ridiculous to make a virtual machine just for that purpose but if no other solution exists this one should work if it's a general bug, not hardware specific. Also you can use Virtual machine for testing, so it shouldn't be such a waste.

| improve this answer | |
  • I like your lateral thinking! Should be straightforward to do this - clonezilla your PC and restore that image directly into a virtual guest. – fossfreedom Jun 26 '11 at 10:11
  • how do I know if the bug is reproducible ? it probably wont be... – Alvar Jun 26 '11 at 10:16
  • 2
    @Alvar if you can't find anybody else reported this bug then there is only one way to find out if it's reproducible, to try to install it in virtual (or physical for that mater) machine. Although, as I said this method is not elegant at all but installation shouldn't take longer than 20 minutes and then you can check it. – enedene Jun 26 '11 at 10:28
  • It's probably a bug only known to my machine (asus 1201n)... – Alvar Jun 26 '11 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.