by Peter Kelly (critter)
What is it?
The simple login manager is a display manager designed to be both light on resources and simple to use and configure, and it accomplishes both of these goals admirably. This makes it ideal for lighter window managers and desktop environments. But, since it is desktop independent, it may be used with almost any installation.
Why on earth would you bother to change a login application?
Well, the login screen is the first screen that you see after booting up. Therefore, it should look the way you want it to. Although all of the login managers provided as default with the PCLinuxOS releases are configurable, it is sometimes not an easy matter to get them to behave as you would like. The SLIM login manager can help change that.
What can it do?
On first installation, it looks rather underwhelming. There is a box to type in a user name and then a password and nothing else. This is unlike the more robust login managers such as KDM, the KDE specific login manager, which has buttons to perform various functions, a clock, a logo and possibly other ornaments. However, don't be put off by the simple, uncluttered appearance, as slim has a few hidden tricks that make it a real competitor. Add to this the simplicity of configuration and we have a real winner for those who like to have things set up just how they like it.
Does it have any drawbacks? Well, maybe one small one that some power users might find irksome. It apparently does not support remote login capabilities. For most users, though, this is unlikely to present a problem.
This is a snapshot of the default login screen. As you can see, it is pretty basic and it would seem that the only option you have here is to type in a user name.
Other graphical login managers offer the option to perform actions such as shutting down or restarting the system. This login manager offers similar options, but in a slightly different manner. There are some special user names that you can use to login that perform these actions for you. Login as "halt", enter the root password and the system will shut down.
Other 'special user' names are:
No buttons, no clutter. Just the ability to control the system.
- console to launch a terminal
- exit to the shell
Press the F1 key repeatedly and you will be prompted to login to a series of different desktop environments or window managers. Enter a valid username and password, and if that desktop is available, you will be logged into that desktop. If not available, you will be returned to the login screen.
No buttons, no clutter. Just the ability to access the desktop that you want.
To install SLIM, open synaptic, press Reload, Mark All Upgrades, (this is necessary to make sure that everything is compatible), then click Apply (to install the selected packages). Afterwards, click Search. In the search box type slim and in the dropdown "look in" box select name. Enter slim and perform the search. You should get two results, slim and slimthemes. Install them both.
Note: At the time of this writing, SLIM is not available in the 64 bit version, which has only just been officially released. For the impatient, more info about SLIM, including some documentation and themes, can be found here.
Configuring SLIM is a matter of editing a text file /etc/slim.conf.
Since this file affects all users of the system, you will need root privileges to perform the edits. You may have your own way of opening an editor as root, perhaps Dolphin's right click "Edit as root" option.
I do it this way. Open a terminal and type su -. Press Enter. Enter the root password at the prompt, then type cp /etc/slim.conf /etc/slim.conf.bak. This will create a backup of the file in case things don't go to plan. Next type nano /etc/slim.conf to open the configuration file in nano editor.
This file has a lot of comments to help you set things up. Although this is only a text file, it can look daunting. So I have reproduced it below without those comments, and have added line numbers so that I can take you through it line by line. It may look like a lot, but few changes are necessary for most users.
1. default_path ./:/bin:/usr/bin:/usr/sbin:/sbin
2. default_xserver /usr/bin/X
3. xserver_arguments dpi 75 br nolisten tcp
4. halt_cmd /sbin/shutdown h now
5. reboot_cmd /sbin/shutdown r now
6. console_cmd /usr/bin/xterm C fg white bg black +sb T
"Console login" e /bin/sh c "/bin/cat /etc/issue;
7. #suspend_cmd /usr/sbin/suspend
8. #hibernate_cmd /usr/sbin/hibernate
9. xauth_path /usr/bin/xauth
10. authfile /var/run/slim.auth
11. numlock on
12. hidecursor false
13. login_cmd if [ r ~/.xinitrc ]; then exec /bin/bash
login ~/.xinitrc %session; else PREFFERED=%session
exec /bin/bash login /etc/X11/xinit/xinitrc; fi
14. daemon yes
15. sessions lxde,openbox,fluxbox,enlightenment,afterstep,
16. screenshot_cmd import window root /slim.png
17. welcome_msg Welcome to %host
18. session_msg Log in to:
19. shutdown_msg The system is shutting down...
20. reboot_msg The system is rebooting...
21. default_user jane
22. focus_password yes
23. #auto_login no
24. current_theme default
25. lockfile /var/run/slim.lock
26. logfile /var/log/slim.log
Most of these lines you can leave as they are, but this is what they mean.
1. This is where SLIM will look for the utilities it needs to perform its functions. Most people can ignore this.
2. Where to find the application that actually does the graphical interface. As different distributions put things in different places, this may occasionally need to be changed. Fortunately, we don't, so we can ignore it.
3. All but senior power users can ignore this one.
4 to 8. These are the commands that you want executed when you want to, for example, shutdown the system. Those with a "#" are inactive. You may want to put the system into a sleep state and find that the suspend command does not work, but pmsuspend does. This is where to change it.
9 & 10. Leave as they are unless you really know what you are doing.
11. This may be useful. If you find that your password is not being accepted (and you can't see what you typed because only asterisks are echoed to the screen) then it could be that the numlock key is active. Change to off.
12. Hide the mouse cursor. This may or may not work.
13. This is the command that actually gets you to your selected desktop. Leave it as it is. If you find a good reason to change it then please let me know.
14. You want to say yes here.
15. This is a list of the available desktops to which you can log in. We shall be changing this.
16. If you have the ImageMagick utility installed, and I recommend that you do, then pressing the F11 key while at the slim screen will put a screenshot of that screen in the root (/ ) directory for you to include when sharing your breathtaking new theme online.
17. The basic message that you want to see while being prompted to log in.
18. The message displayed when pressing the F1 key to select a desktop to which you want to log in.
19 & 20. Should be self explanatory.
21. The default user name to display. Leave blank to start with an empty user name field.
22. Yes means to put the cursor in the user box, ready for typing.
23. If you want to be automatically logged in with no password, remove the # and change to yes. This is a security risk, so beware.
24. The name of the current theme to display.
25 & 26. Leave these as they are.
I think that only lines 15 & 24 need to be edited by most users.
As an example: if you installed the lxde version of PCLinuxOS, then added the xfce and enlightenment desktop environments, (use synaptic to install taskenlightenment and taskxfce), you would want to edit this to read:
Pressing the F1 key would then cycle through these three options.
Themes, by default, are stored in /usr/share/slim/themes, and each has their own directory. Once you are happy with your new theme, that is where to place it.
The second part of the configuration is only required if you do want to switch between desktop environments.
Create a file named
in your home directory.
Add the following (for our example)
case $1 in
lxde) exec startlxde ;;
xfce4) exec startxfce4 ;;
enlightenment) exec enlightenment_start ;;
*) exec $DEFAULT_SESSION ;;
The first line tells SLIM which desktop to launch if you haven't pressed F1 and selected a particular desktop, otherwise it launches the chosen desktop. Lines 3, 4 & 5 execute the relevant command to launch the chosen desktop, which must be one of those listed in line 15 of the configuration file. That's it.
After installing slim you need to tell the system to use it. Open the PCLinuxOS Control Center, select Boot, Set up Display Manager and you should see a screen like this.
Select SLiM and say yes when prompted to restart the desktop manager.
You will be logged out and then presented with a screen like the first screenshot.
You may now log in as usual, press F11 to create a screenshot, press F1 to cycle through the available desktop choices, or type in one of the previously mentioned 'special' user names to shutdown, reboot etc.
Creating your own themes and previewing them is a breeze and one of the best reasons for choosing this login manager.
A theme consists of a directory with the name of the theme. In the directory are three files.
1. A background image named background.jpg or background.png.
2. A panel image named panel.jpg or panel.png.
3. A text file named slim.theme.
As an example we shall say that our default desktop is LXDE and that we want a login screen that provides a consistent look through the boot process. To make life easier I am going to "borrow" some graphics and a theme script and modify them.
Create a directory in your home directory named pcloslxde (for convenience).
Open a file manager and navigate to /usr/share/slim/themes/rearwindow.
Copy the files panel.png and slim.theme to your pcloslxde directory.
Navigate to /usr/share/plymouth/themes/ and copy the file background.png to our theme directory.
We have a new theme! To view it type:
slim p /home/user/pcloslxde
Replace user with your login name.
The p option allows you to preview the theme. The preview is fully functional but will not relog you in. If you press the F1 key you will be shown the available options. You can even go through the motions of typing in one of the special user names such as halt followed by the root password to see what would be shown on the actual login screen. This is a nice touch that makes creating themes so much easier.
Well, it worked, but it's not quite what I wanted.
The header is the hostname of this PC which has not been set.
The panel should be central and higher.
The background color of the input boxes looks out of place.
Open panel.png in your favourite graphics editor and change the color of the input fields to white.
Open the file slim.theme in an editor.
The first two lines credit the author of this file. We should leave those in place and add some of our own so that it looks like this.
# pcloslxde theme for SLiM
# based on
# rearwindow theme for SLiM
Make the following additional changes:
change input_panel_x from: 12% to: 50% to center the panel.
change input_panel_y from: 88% to: 75% to raise the panel a little.
change %host login: to: Login:
change username_color from: #e3d6aa to: #7b9ed2
change username_font from: Verdana:size=14:bold to: Verdana:size=18:bold
change username_shadow_color from: #333333 to: #0d1e3a
Save the file.
Of course, these changes are only my preferences and you may have to adjust them to suit your taste and your screen resolution. But this should demonstrate that the values are quite intuitive. I load the background into a graphics editor and use the color picker tool to extract the color values.
Preview the theme again.
That looks better. Now all we have to do is copy the entire theme folder to where SLIM will look for it and to tell SLIM to use this theme.
Edit the file /etc/slim.conf (as root).
Change the line that reads current theme default (line 24 in my listing above) to current theme pcloslxde.
Copy the folder and contents to /usr/share/slim/themes, and we are done.
You can now have your own personalised login screen limited only by your imagination.