Skip to main content

HOWTO create your own GDM Themes ( login screens )


Create your own login screens in ubuntu..

Components of a GDM Theme

A GDM Theme is basically composed by:

* 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.

1. Create a theme directory...
$ mkdir mytheme
$ cd mytheme
2. Now copy the images to the directory and create a the xml file....
$ vi mytheme.xml
In general, the first item to be changed is the background image. The background image must be at least as big as the screen resolution. In order to make the theme suitable to other users, it is a good idea to use at least 1600x1200 pixel images, as they look sharp even on high-resolution screens. A small 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
A Sample mytheme.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE greeter SYSTEM "greeter.dtd">
<greeter>

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

<!-- ubuntu logo -->
<item type="pixmap">
<normal file="ceal.png" alpha="1.0"/>
<pos x="50%" y="33%" width="scale" height="18%" anchor="c"/>
</item>

<!-- bottom bar -->
<item type="pixmap">
<normal file="bottom_bar.png"/>
<pos y="100%" x="0" width="100%" height="100" anchor="sw"/>
</item>
<item type="rect">
<pos y="100%" x="0" width="100%" height="42" anchor="sw"/>
<box xpadding="10" spacing="10" orientation="horizontal">
<!-- reboot -->
<item type="rect" id="options_button" button="true">
<pos y="50%" width="box" height="box" anchor="w"/>
<box xpadding="0" spacing="2" orientation="horizontal">
<item type="pixmap">
<normal file="icon-session.png"/>
<prelight file="icon-session-prelight.png"/>
</item>
<item type="label">
<normal font="Sans 11" color="#ffffff"/>
<pos y="50%" anchor="w"/>
<stock type="options"/>
</item>
</box>
</item>
<!-- halt -->
<item type="rect" id="halt_button" button="true">
</item>
<!-- quit / disconnect -->
<item type="rect" id="disconnect_button" button="true">
</item>
</box>
</item>

<!-- hostname and clock -->
<item type="rect">
<pos x="100%" y="100%" width="box" height="42" anchor="se"/>
<box xpadding="10" spacing="10" orientation="horizontal">
<item type="label">
<pos x="100%" y="50%" anchor="e"/>
<normal font="Sans Bold 11" color="#ffffff"/>
<text>Customised by Dipin Krishna. College Of Engineering Attingal. %h //</text>
</item>
<item type="label" id="clock">
<pos x="100%" y="50%" anchor="e"/>
<normal font="Sans 11" color="#ffffff"/>
<text>%c</text>
</item>
</box>
</item>


<!-- password box -->
<item type="rect">
<pos x="50%" y="60%" width="box" height="box" anchor="c"/>
<box xpadding="0" ypadding="0" spacing="5" orientation="vertical">
<item type="pixmap">
<pos x="0" y="0" width="box" height="box"/>
<normal file="boundingbox.png"/>
<box xpadding="35" ypadding="15" spacing="10" orientation="vertical">
<item type="label" id="pam-prompt">
<pos x="0"/>
<normal font="Sans Bold 10" color="#ffffff"/>
<stock type="username-label"/>
</item>
<item type="pixmap">
<normal file="userentry.png"/>
<pos width="160" height="24"/>
<fixed>
<item type="entry" id="user-pw-entry">
<normal color="#000000" font="Sans 12"/>
<pos y="2" x="2" width="-4" height="-4" anchor="nw"/>
</item>
</fixed>
</item>
<!-- timer warning -->
<item type="label" id="timed-label">
<show type="timed"/>
<normal font="Sans Bold 11" color="#523921"/>
<stock type="timed-label"/>
</item>
</box>
</item>
<item type="rect">
<box xpadding="10" ypadding="8" spacing="10" orientation="horizontal" homogeneous="true">
<!-- language -->
<item type="rect" id="language_button" button="true">
</item>
<!-- session -->
<item type="rect" id="session_button" button="true">
</item>
</box>
</item>
</box>
</item>

<!-- caps lock warning -->
<item type="label" id="caps-lock-warning">
<pos x="50%" y="50%" anchor="c"/>
<normal font="Sans Bold 11" color="#dc292b"/>
<stock type="caps-lock-warning"/>
</item>


<!-- pam error -->
<item type="label" id="pam-error">
<pos x="50%" y="53%" anchor="c" />
<normal font="Sans Bold 11" color="#dc292b"/>
<text></text>
</item>

<!-- pam message (hidden, but required) -->
<item type="label" id="pam-message">
<pos x="50%" anchor="c" />
<normal alpha="0.00"/>
<text></text>
</item>

</greeter>

A Sample GdmGreeterTheme.desktop
[GdmGreeterTheme]
Greeter=mytheme.xml
Name=HumanCeal
Description=Ubuntu Ceal Welcome Theme
Author=Dipin Krishna
Copyright=(c) 2009 GPL
Screenshot=screenshot.png

Comments

Anonymous said…
nice post end thanks, now iĺl do my own them. :)

Popular posts from this blog

How to install Skype on Ubuntu 10.04 Lucid Lynx

UPDATE: Skype has now been uploaded to the "partner" official Ubuntu 10.04 Lucid Lynx repository. See Install Skype in Ubuntu 10.04 Lucid Lynx from official partner repository Command Line way Get the package: For 32-bit $ wget http://www.skype.com/go/getskype-linux-beta-ubuntu-32 For 64-bit $ wget http://www.skype.com/go/getskype-linux-beta-ubuntu-64 You will need to install the following libraries. $ sudo apt-get install libqt4-dbus libqt4-network libqt4-xml libasound2 Now install skype(the file u just downloaded, may be named intrepid-ibex) $ sudo dpkg -i skype-XXXXXXXXXXXX.deb If you still get some dependency error then just type the command below $ sudo apt-get -f install this will install the dependencies and the skype. Non - Terminal Download the setup 32 -bit 64 -bit You will these packages: libqt4-dbus libqt4-network libqt4-xml . Goto Synaptic manager and install them. Now Launch the Skype install .deb file (just double click it) and follow the on screen prompts....

gtalx: Howto Gtalk in ubuntu ( google talk )

Did you fail to use " gtalk in ubuntu " ... Now you can chat and talk to your gmail buddies in ubuntu... 1. check for gtk2.0 and qt4 $ sudo apt-get install libgtk2.0-dev $ sudo apt-get install libqt4-dev libogg-dev libtheora-dev $ sudo apt-get install libsdl-dev libavcodec-dev libswscale-dev $ sudo apt-get install libexpat-dev libraw1394-dev libvorbis-dev $ sudo apt-get install libgsm1-dev  libspeexdsp-dev libmediastreamer0-dev libortp-dev 2. Remove 'pulse audio sound server' Open synaptic package manager and remove pulse audio 3. "Download gtalx" from here Dowload it here 4. Extract the file.... $ tar -zxvf 0.0.4.tar.gz 5. Get into the directory.... $ cd 0.0.4 and then... $ sudo chmod u+x make $ ./make $ sudo ./make install 6. Enjoy..... Please comment about your installation(whether it was a success or not....) Take gtalx from Applications > Internet > gtalx Enter your gmail login information..and click connect... ...

How to install Skype on Ubuntu 9.10 Karmic Koala

The two methods  below doesn't work now. Please see http://blog.dipinkrishna.info/2009/11/how-to-download-and-install-skype-for_3060.html for a successfull installation of skype on ubuntu. I have provided two methods. Please do comment which one is successful. Follow these steps to install skype in ubuntu 9.10 (64 bit).         First add:             deb http://packages.medibuntu.org/ karmic free non-free         to your source.list Now open a terminal and type: $ sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list Then do an update: $ sudo apt-get update $ sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring $ sudo apt-get -q update And finally install Skype. $ sudo apt-get install skype Ready ... now start skype with $ skype OR Download the setup 32 -bit 64 -bit Launch the Skype i...