Gdm - have a live screensaver with your log in screen

From blag.wiki.aktivix.org

Jump to: navigation, search

Contents

INTRO

Here’s how to have a screensaver running when X starts. This removes gdm’s default graphical greeter and replaces it with a “log in box” but with a screensaver running live in the background

estimated time: five minutes difficulty:- nah, it’s easy ;-)

Background preparation

first check that you have the xscreensaver package. Run the command

whereis xscreensaver

You should see listings like /usr/blah/xscreensaver otherwise you may have to install the packagae or check your $PATH as required.

back up the original file!!

cp /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm.conf.original

Configuration

The file that we work with is the file /etc/X11/gdm/gdm.conf. Note that lines beginning with a ‘#’ are comments and are not used by the computer. Use them to read the code writer’s recommendations, (very useful), or to make your own notes in this file. We edit this file as root and save changes once finished. Having a back up copy means that you can hack till the cows come home. You've kept a back up so there are no worries.

example configs

These settings are based on -my- preferences. They do not have an effect on the gdm login screen that we are about to set up.

I prefer not to allow remote logins or root logins
section- [daemon]

disallow automatic logins
AutomaticLoginEnable=false
AutomaticLogin=false

section - [security]

disallow root and remote logins
AllowRoot=false
AllowRemoteRoot=false
AllowRemoteAutoLogin=false

section - [greeter]
This is the standard login greeter. It does look a it basic but we can “soup” this up a bit later

don’t show a title bar that a user can move about.

TitleBar=false

don’t show the user any configurations available at login time

ConfigAvailable=false


Now for the fun

From here on we configure our log in screen to have a screensaver (called xscreensaver), running behind the “login box” when the computer starts with X (graphical mode). The first thing you need to do is to find out where your screensavers -are- and what they are. For my system i run

ls -l /usr/X11R6/lib/xscreensaver/

this tells what screensavers i have then

ls -l/usr/X11R6/lib/xscreensaver/ |wc -l

this tells me how many screensavers i have got to play with

to see a screensaver in action run this command

xscreensaver &

then hit settings. near the top of the screen, look for mode. Now hit only one screen saver. Hit any screensaver on the (hopefully long) list of files. These files are the ones that you saw when you ran the ls -l /usr/X11R6/lib/xscreensaver/ command. Select a simple one like juggler. Hit settings, then advanced. Make a note of the commad. For example

juggler -root

we will use that later :)

do you still have that file /etc/X11/gdm/gdm.conf to hand? get ready to edit!

section - [greeter]

Welcome=Login to network %n

You can not have a background picture -and- an xscreensaver running at the same time, so turn those background images off.

BackgroundType=0

Here we specify the full path the the xscreensaver that we want. Now it’s time to make use of the command that we recored earlier

BackgroundProgram=/usr/X11R6/lib/xscreensaver/sonar -root

Here we tell X to keep runnig the screensaver untill we login

RunBackgroundProgramAlways=true

Save any changes that you have made to this file.

Now it’s time to test. An unsophisticated method to restart X is to hit <ctrl><alt><backspace> I guess that you could run in a virtual terminal as user root

init 3 && init &

but heyyy :=)

There’s prolly some other method like

/etc/init.d/blah-blah

but I don’t know it.

Anyway, what ever method that you have used to restart X -should- have a nice log in screen with an xscreensaver running in the backgorund :=)

Note

If X borks and you an see a login box, get into a virual terminal and

mv /etc/X11/gdm/gdm.conf.original /etc/X11/gdm/gdm.conf

to get things back to normal. This was the original file with all of the default setting

Credits

jayeola - john maclean

Personal tools