How to take a Screenshot of a GDM Theme

Write tutorials here
There are more tutorials here
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
Level 8
Level 8
Posts: 2421
Joined: Wed Apr 04, 2007 1:50 pm
Location: Here again :)

How to take a Screenshot of a GDM Theme

Postby merlwiz79 » Fri Jan 09, 2009 2:48 am

Step One:
Install imagemagick

Code: Select all

sudo apt-get install imagemagick

Step Two:
Run this in terminal

Code: Select all

echo "chvt 7 ; sleep 5 ; XAUTHORITY=/var/lib/gdm/:0.Xauth DISPLAY=:0.0 import -window root /tmp/screenshot.png" > /tmp/capture

Step Three:
Logout to gdm
Press Ctrl+Alt+F1
Now login into tty1

Step Four:
run this command

Code: Select all

sudo sh /tmp/capture

Now the screenshot is in /tmp/screenshot.png

Level 15
Level 15
Posts: 5501
Joined: Tue Feb 13, 2007 10:50 am
Location: HartfordCity, Indiana USA

Re: How to take a Screenshot of a GDM Theme

Postby exploder » Fri Jan 09, 2009 9:51 am

I found this too. Here is the whole process if anyone wants it.

Find an existing GDM Theme that you think would work with the artwork you want to use. Download and extract the theme and replace the background and screenshot images with what you want to use. A GDM theme that is made with .jpg files will be smaller in size. The screenshot can be the same as the background until you have the GDM near complete. (The screen capture will produce the proper image.)

Change the name of the folder and the .xml file inside the folder to the name you want for the theme. Make the GDMGreeterTheme.desktop file executable, if it is not already. Display the GDMGreeterTheme.desktop files contents and edit the file so it reflects the theme you are making and save the file.

Right click on the folder and choose "Create Archive". Now you can install the GDM theme so you will be able to do the screen capture for the final "screenshot" in the folder. You will need to install xnest from the repo's to do the screen capture.

Delete the archive you made because you will be creating another one with the same name once you have the screenshot.

Here is the tricky part! Open Gimp, File, Acquire, Screenshot. Remove the check for "include window decoration" and set the delay for 10 seconds.

Open a terminal and type gdmflexiserver --xnest. Click on "Snap' in the screenshot dialog and then press "Enter" to execute the command for xnest. The GDM should appear in a window. Place your curser on the window and when it changes to a + , click your mouse. Save the screen capture as your "screenshot.jpg" in your theme's folder. (Save a copy to scale if you want to post it on gnome-look.)

Make a new archive from your theme folder and you are done! You can re-install the GDM theme on your machine to make sure everything is how you want it.

The whole process usually takes about 15 minutes once you get used to it.

Return to “Tutorials”