6.2. Customizing the login screen

6.2.1. Using xdm

copy /etc/X11/xdm/Xsetup_0 to/etc/X11/xdm/Xsetup_1

for additional X servers create the files/etc/X11/xdm/Xsetup_[n], where n is the number of the X server starting from 0

  1. modify the line containing the background image, to adjust the path to your image for the 2nd X server

    ....
    if [ -r /usr/share/mdk/backgrounds/default.png -a -x /usr/bin/qiv ]; then
        /usr/bin/qiv -z /usr/share/mdk/backgrounds/default.png
    else
        /usr/X11R6/bin/xsetroot -solid "#21449C"
    fi
    ....

    modified

    ....
    if [ -r /usr/share/mdk/backgrounds/flower.jpg -a -x /usr/bin/qiv ]; then
        /usr/bin/qiv -z /usr/share/mdk/backgrounds/flower.jpg
    else
        /usr/X11R6/bin/xsetroot -solid "#21449C"
    fi
    ....

    you can also specify a different background color, with :

    ....
    #if [ -r /usr/share/mdk/backgrounds/flower.jpg -a -x /usr/bin/qiv ]; then
    #    /usr/bin/qiv -z /usr/share/mdk/backgrounds/flower.jpg
    #else
        /usr/X11R6/bin/xsetroot -solid "[your color]"
    #fi
    ....
  2. comment out the lines which may affect the primary X server

    from

    ....
    if [ -x /etc/X11/xinit.d/numlock ]; then
        /etc/X11/xinit.d/numlock &
    fi
    ....

    to

    ....
    #if [ -x /etc/X11/xinit.d/numlock ]; then
    #    /etc/X11/xinit.d/numlock &
    #fi
    ....
  3. inform xdm about the existence of Xsetup_1 by modify /etc/X11/xdm/xdm-config

    ......
    ! The following three resources set up display :0 as the console.
    DisplayManager._0.setup:        /etc/X11/xdm/Xsetup_0
    DisplayManager._0.startup:      /etc/X11/xdm/GiveConsole
    DisplayManager._0.reset:        /etc/X11/xdm/TakeConsole
    DisplayManager._0.startAttempts: 1
    !
    ......

    modified

    ......
    ! The following three resources set up display :0 as the console.
    DisplayManager._1.setup:        /etc/X11/xdm/Xsetup_1
    DisplayManager._0.setup:        /etc/X11/xdm/Xsetup_0
    DisplayManager._0.startup:      /etc/X11/xdm/GiveConsole
    DisplayManager._0.reset:        /etc/X11/xdm/TakeConsole
    DisplayManager._0.startAttempts: 1
    !
    ......
  4. repeat the procedure for each additional X server

  5. check for additional customizing options

    Linux-Journal Issue 68: Linux Apprentice: Customizing the XDM Login Screen

6.2.2. Using kdm

6.2.3. Using gdm

this doesn't work on my current setup with gdm-2.4.1.3, the theme overwrites the background

but it should work on some older 2.0 versions

  1. copy the file /etc/X11/gdm/Init/Default to

    /etc/X11/gdm/Init/:0

    and /etc/X11/gdm/Init/:1

  2. add this lines to use the background which kdm uses

    of course you can use another image file as well, just change the full path to it

    if [ -r /usr/share/mdk/backgrounds/default.png -a -x /usr/bin/qiv ]; then
        /usr/bin/qiv -z /usr/share/mdk/backgrounds/default.png
    else
        /usr/X11R6/bin/xsetroot -solid "#21449C"
    fi

    you can also specify a different background color, with :

    /usr/X11R6/bin/xsetroot -solid "[your color]"

    modified

    /etc/X11/gdm/Init/:0

    #!/bin/sh
    
    if [ -r /usr/share/mdk/backgrounds/default.png -a -x /usr/bin/qiv ]; then
        /usr/bin/qiv -z /usr/share/mdk/backgrounds/default.png
    else
        /usr/X11R6/bin/xsetroot -solid "#21449C"
    fi
    if [ -x /etc/X11/xinit/fixkeyboard ]; then
        /etc/X11/xinit/fixkeyboard
    fi
    
    exit 0

    /etc/X11/gdm/Init/:1

    #!/bin/sh
    
    if [ -r /usr/share/mdk/backgrounds/flower.jpg -a -x /usr/bin/qiv ]; then
        /usr/bin/qiv -z /usr/share/mdk/backgrounds/flower.jpg
    else
        /usr/X11R6/bin/xsetroot -solid "#21449C"
    fi
    
    if [ -x /etc/X11/xinit/fixkeyboard ]; then
        /etc/X11/xinit/fixkeyboard
    fi
    
    exit 0
  3. repeat the procedure for each additional X server, using files /etc/X11/gdm/Init/:[n] , where n is the number of the display

  4. check for additional customizing options

    Gnome Display Manager Reference Manual