Menu Close

Small GDM Guide

Here is a small guide for making your own GDM Themes, this is not a full manual but it will only tell you some of the basics for making your own GDM Theme. It is always easier to start off of an existing theme, rather than doing it from scratch. Making your GDM can be very tricky sometimes and by changing an existing one you will learn more and faster!!

A GDM is a graphical login program distributed with the GNOME desktop. Similar to Windows Logon Studio, GDM allows you to change the look of the logon screen. A GDM Theme basically contains:

* A background image
* A screenshot to be displayed in the GDM Configuration
* Icons (images for the icon bar)
* An xml file, where the actual theme is defined. This file allows the declaration of frames, images, the login box,  caps lock warning frame,     background, icons, multi-language captions, etc.
* The GdmGreeterTheme.desktop file, which is not a true .desktop file, but it contains the name of the xml, screenshot and other information to be displayed in the GDM Configuration screen

Creating your own theme

Lets start with the background. The prefered image size is 1600×1200, as they look sharp even on high-resolution screens. A smaller image can also be used, but it will loose quality when expanded. The image must be placed in the theme directory and declared in the xml file as follows:

<item type="pixmap">
<normal file="background.jpg"/>
<pos x="0" y="0" width="100%" height="0"/>
</item>

Next, you will have to reposition your prompts menus, labels and icons in order to match your background image. Even though you can make it all transparent, a centered login box might not always the best choice.
You can define images, rectangles and labels with the following tags (respectively):

<item type="pixmap">
<item type="rect">
<item type="label">

Using the item tag, you can also specify the location of option buttons, system messages, login screen, etc, by adding id= to the item tag. All the GDM system tags I am aware of are:

<item type="rect" id="language_button" button="true">
<item type="rect" id="session_button" button="true">
<item type="rect" id="system_button" button="true">
<item type="rect" id="disconnect_button" button="true">
<item type="label" id="clock">
<item type="rect" id="caps-lock-warning">
<item type="rect" id="timed-rect">
<item type="label" id="timed-label">
<item type="label" id="pam-prompt">
<item type="entry" id="user-pw-entry">
<item type="label" id="pam-message">
<item type="label" id="pam-error">

Use the pos tag within each item section to define its x,y position and make sure it all looks in harmony with your background image. Last, the xml file must be declared in the GdmGreeterTheme.desktop file as follows:

Greeter=theme.xml

Now put a screenshot in your theme directory and make a reference to it in your GdmGreeterTheme.desktop, adding also your author, name, description and copyright fields as follows:

[GdmGreeterTheme]
Greeter=theme.xml
Name=n00b GDM
Description=n00b GDM Theme
Author=tinuz, n00bsonubuntu.com
Screenshot=screenshot.jpg
Copyright=Copyright (C) 2009

Finishing up

Last, all you have to do is make a gzipped tarball with tar -zcf YouRGdm.tar.gz YouRGdmDir. It can be now easily installed on any computer from the GDM Configuration Screen. Open your Login Window manager (System>Administration>Login Window), select the Local tab, click the add button and browse to your GDM theme folder then select your theme and click on Install. Look for your theme in the list and select it by clicking on the radio buton.

To see your GDM you must have Xnest installed, if you dont have Xnest installed:

Open a terminal and type:

sudo apt-get install xnest

After installing Xnest type:

gdmflexiserver –xnest

And your GDM theme will be shown, make a screenshot of your GDM Theme and open the newly created screenshot in GIMP or your favorite image editor and shrink the screenshot down to 188×140. Add the screenshot to your GDM Theme and all is done!!

129 total views, 2 views today

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of