Building and maintaining Linux graphic desktops
The course is part of this learning path
This course - the seventh of eleven courses covering LPIC-1 Linux certification - will explore Linux Display Managers and graphic Desktop Environments. You will learn how to:
- configure hardware peripherals for use in a GUI environment
- control graphic login sessions
- manage Display Managers like LightDM
- enable and manage Linux accessibility utilities to ensure that users with disabilities can access system resources, and
- build a graphic user interface on top of a virtual server in Amazon's AWS.
If you have thoughts or suggestions for this course, please contact Cloud Academy at email@example.com.
Working with Linux display managers including LightDM
The role of Linux display managers has historically been something of a moving target, while managers like XDM, KDM, and GDM have and in some cases, still do enjoy widespread adoption, as of the most recent update to their exam topics, the LPIC wants us to focus most of our attention on LightDM. Nevertheless, we should spend just a few moments discussing those three older display managers. XDM, the X window
display manager has been around since 1988. That's 1988, long before Linux was born. It's a very minimal environment that's really only useful for supporting standalone X terminal-like systems.
The Gnome display manager, GDM was designed as a graphical replacement for XDM, and allows users to manage their environment settings for both attached and remote displays through GUI rather than command line tools. KDM is the display manager of the KDE desktop environment. KDE, by the way, has been competing for some years against Gnome and among others, Ubuntu's Unity, for the hearts and minds of free desktop
Because it's designed to work without the need to load much overhead at all, LightDM is quite a bit faster than some of the older alternatives. It also does quite a bit less than traditional display managers, which would provide window control elements, manage virtual desktops and provide windows frames functionality. LightDM, on the other hand, is normally only there to start X servers, user sessions, and the greeter login screen.
Let's see how system administrators can manage LightDM configurations. While LightDM will read configuration details from files in the /user/share/lightdm/lightdm.conf.d directory, you can only edit those values
from either files in the /etc/lightdm/lightdm.conf.d directory, or from the lightdm.com file in the /etc/lightdm directory. In my case, there are no files in the /etc/lightdm/lightdm.conf.d directory, and
lightdm.conf, as you can see, states that my current default desktop session will use Gnome Fallback. If I wanted to change that value, I would either edit this file or create a file with the same contents in the lightdm.conf.d directory, named something like 50-myconfig.conf.
You can see a sample configuration file with all the available options in your /user/share/doc/lightdm directory. Since the file is compressed, we'll use gunzip to make it readable. And since we're in the /user directory tree, we'll need to become sudo to save the decompressed file.
Configuring the lightDM display manager
There are a number of configurations you can control from the LightDM.conf file. By default, users can log into a lightDM system without a password, as guest. If you would like to disable this, add a line
reading allow-guest=false to the lightdm.conf file. Normally, the greeter screen displays a menu list of system users. If you'd like to disable this, which would require users to type their user names in manually, add greeter-hide-users=true. You can set the system to automatically log in a particular user by adding the auto login-user line to the lightdm.conf file, followed by the particular user name. If
you'd like to set a grace period within which users can override the auto login default, add the time outline, where you can specify the length of the delay period in seconds. If you're building some kind
of public access kiosk, you might like to set the auto login to a guest session. You can do this with auto login-guest=true, and obviously without the timeout option. To change the greeter itself, you can
reference a greeter.desktop file in your /user/share/xgreeters directory from the lightdm.conf file, using something like this. Finally, if you want LightDM to run a script on start up, you can add a reference to this command as part of a session-setup-scriptline. LightDM has more options that you can see in the sample.com file we viewed earlier, in /user/share/doc/lightdm.
Let's review what we now know about the LightDM display manager. LightDM reads files in the /user/share/lightdm/lightdm.conf.d directory, but the config values are edited, using /etc/lightdm/lightdm.conf, or individual files in /etc/lightdm/lightdm.conf.d. By adding entries to the lightdm.conf file, you can control the display manager's login behavior. Adding allow-guest=false will prevent guest user logins. Greeter-hide-users=false will prevent a user menu from being displayed. Autologin user=username will automatically log the specified user into the system on boot. And autologin guest=true will create a public access kiosk. You can change the greeter itself by pointing to the appropriate file in /user/share/xgreeters. And finally, you can have light DM run scripts or commands for you at start up.
David taught high school for twenty years, worked as a Linux system administrator for five years, and has been writing since he could hold a crayon between his fingers. His childhood bedroom wall has since been repainted.
Having worked directly with all kinds of technology, David derives great pleasure from completing projects that draw on as many tools from his toolkit as possible.
Besides being a Linux system administrator with a strong focus on virtualization and security tools, David writes technical documentation and user guides, and creates technology training videos.
His favorite technology tool is the one that should be just about ready for release tomorrow. Or Thursday.