![]() | The kdm Handbook |
| Next |
Copyright © 2000 Neal Crook
Copyright © 2002 Oswald Buddenhagen
Copyright © 2003 Lauri Watts
This document describes kdm the KDE Display Manager. kdm is also known as the “Login Manager”.
Table of Contents
![]() | Introduction |
| Prev | Next |
kdm provides a graphical interface that allows you to log in to a system. It prompts for login (username) and password, authenticates the user and starts a “session”. kdm is superior to xdm, the X Display Manager, in a number of ways.
| Prev | Home | Next |
| The kdm Handbook | Up | Quick Start Guide |
![]() | Quick Start Guide |
| Prev | Next |
This is a quick start guide for users who fit the following pattern:
X is configured and works with the command startx from the commandline.
Each user will generally only use a single window manager or desktop environment, and does not change this choice very often, or is comfortable editing a single text file in order to change their choice.
This scenario will be sufficient for many environments where a single user or several users normally boot the computer and log into their preferred environment.
Procedure 2.1. Setting up a Default Session
Create or open the file ~/.xinitrc
If you already have a working ~/.xinitrc, go to the next step
If one does not already exist, add a line to the ~/.xinitrc to start your preferred window manager or desktop environment.
For KDE you should enter:
startkde
For other window managers or desktop environments, you should look in their documentation for the correct command.
Make a link as follows:
ln -s ~/.xinitrc ~/.xsession
At this point, typing startx on the commandline should start X, with a KDE session. The next task is to try kdm.
As root, type kdm at the prompt.
You should see a login window, which is described more fully inChapter 3.
Typing your normal username and password in the fields provided, and leaving default selected as the session type should now open a KDE session for your user.
If you have other users to configure, you should repeat the procedure above for each of them.
This is a quick guide to getting up and running only. You probably will want to customize kdm further, for example, to hide the names of the system accounts, to allow further sessions, and much more. Please read through the rest of this manual to find out how to do these things.
| Prev | Home | Next |
| Introduction | Up | The Login Window |
![]() | The Login Window |
| Prev | Next |
The user interface to kdm consists of two dialog boxes. The main dialog box has these controls:
A Login: field for you to enter your username.
A Pass: field for you to enter your password.
(Optionally) a graphical image of each user (for example, a digitized photograph). Clicking on an image is equivalent to typing the associated username into the Login: field. (This feature is an imitation of the login box on IRIX).
A Session Type: drop-down box that allows kdm to be used to start sessions with various different window managers or desktop environments installed on the system.
(Optionally) a region to the right of the Login:, Password: and Session Type: fields which can be used to display either a static image or an analog clock.
A Go! button that validates the username/password combination and attempts to start a session of the selected type.
A Clear button that clears the text from the Login and Pass fields.
(Optionally) A Shutdown button that displays the Shutdown dialog box.
A Menu button that opens an action menu with the following items:
(On local displays) a Restart X Server item that terminates the currently running X-Server, starts a new one and displays the login dialog again. You can use this if the display content seems to be broken somehow.
(On remote displays) A Close Connection item that closes the connection to the XDMCP server you are currently connected to. If you got to this server through a host chooser, this will bring you back to the chooser, otherwise it will only reset the X-Server and bring up the login dialog again.
(Optionally on local displays) A Console Mode item that terminates the currently running X-Server and leaves you alone with a console login. kdm will resume the graphical login if nobody is logged in at the console for some time. To make this work, you need to use the local@<console> syntax in the Xservers file (see comments in that file).
(Optionally) A Shutdown... button that displays the shutdown dialog box.
The Shutdown dialog box presents a set of radio buttons that allow one of these options to be selected:
Shut the system down in a controlled manner, ready for power-down.
Shut the system down and reboot. For systems that use Lilo, an optional drop-down box allows you to select a particular operating-system kernel to be used for the reboot.
Stop and then restart the X-server. Typically, you might need to use this option if you have changed your X11 configuration in some way.
Stop the X-Server and return the system to console mode. This is achieved by bringing the system down to run-level 3. Typically, the system manager might need to use this option before upgrading or re-configuring X11 software.
Pressing the OK button initiates the selected action; pressing the Cancel button returns to the main kdm dialog box.
| Prev | Home | Next |
| Quick Start Guide | Up | Configuring kdm |
![]() | Configuring kdm |
| Prev | Next |
This chapter assumes that kdm is already up and running on your system, and that you simply want to change its behavior in some way.
When kdm starts up, it reads its configuration from the folder $KDEDIR/share/config/kdm/ (this may be /etc/kde2/kdm/ or something else on your system).
The main configuration file is kdmrc; all other files are referenced from there and could be stored under any name anywhere on the system - but usually that would not make much sense for obvious reasons (one particular exception is referencing configuration files of an already installed xdm - in fact when a new kdm is installed, it will actually make use of this possibility if it finds an already installed xdm).
Since kdm must run before any user is logged in, it is not associated with any particular user. Therefore, it is not possible to have user-specific configuration files; all users share the common kdmrc. It follows from this that the configuration of kdm can only be altered by those users that have write access to $KDEDIR/share/config/kdm/kdmrc (normally restricted to system administrators logged in as root).
You can view the kdmrc file currently in use on your system, and you can configure kdm by editing this file. Alternatively, you can use the graphical configuration tool provided by the KDE Control Center (under System->Login Manager), which is described in the KControl help files.
The remainder of this chapter describes configuration of kdm via the KControl module, and the next chapter describes the options available in kdmrc itself. If you only need to configure for local users, the KControl module should be sufficient for your needs. If you need to configure remote logins, or have multiple kdm sessions running, you will need to read on.
Using this module, you can configure the KDE graphical login manager, kdm. You can change how the login screen looks, who has access using the login manager and who can shutdown the computer.
All settings will be written to the configuration file kdmrc, which in it's original state has many comments to help you configure kdm. Using this KControl module will strip these comments from the file. All available options in kdmrc are covered in kdmrc(5).
The options listed in this chapter are cross referenced with their equivalents in kdmrc. All options available in the KControl module are also available directly in kdmrc but the reverse is not true.
In order to organize all of these options, this module is divided into five sections: Appearance, Font, Background, Sessions, Users and Convenience.
You can switch between the sections using the tabs at the top of the window.
If you are not currently logged in as a superuser, you will need to click the Administrator Mode Button. You will then be asked for a superuser password. Entering a correct password will allow you to modify the settings of this module.
From this page you can change the visual appearance of kdm, KDE's graphical login manager.
The greeting string is the title of the login screen. If the string contains the word HOSTNAME it will be translated to the domainless name of the machine kdm is installed on. This is the equivalent of setting GreetString in kdmrc
You can then choose to show either the current system time, a logo or nothing special in the login box. Make your choice in the radio buttons labeled Logo area. Using the Positions setting, you can choose to either center the content of the logo area or to position it using fixed coordinates. This corresponds to LogoArea in kdmrc
If you chose Show logo you can now choose a logo:
Drop an image file on the image button.
Click on the image button and select a new image from the image chooser dialog.
If you do not specify a logo the default $KDEDIR/share/apps/kdm/pics/kdelogo.xpm will be displayed.
Normally the login box is centered on the screen. Use the Position options of you want it to appear elsewhere on the screen. The default is for Centered. If you choose Specify you can further specify the position for the top left of the login window, relative to the top left of the display, in the fields labelled X and Y respectively. These correspond to the keys GreeterPosFixed, GreeterPosX and GreeterPosY in kdmrc.
While KDE's style depends on the settings of the user logged in, the style used by kdm can be configured using the GUI Style and Color Scheme: options. These correspond to the keys GUIStyle and ColorScheme in kdmrc respectively.
Below that, you have a dropdown box to choose the language for your login box, corresponding to setting Language in kdmrc.
From this section of the module you can change the fonts used in the login window.
You can select three different font styles from the drop down box (Greeting, Fail, Standard). When you click on the Change font button a dialog appears from which you can select the new characteristics for the font style.
The Greeting font is the font used for the title (Greeting String).
The Fail font is used when a login fails.
The Standard font is used in all other places in the login window.
An example of each font can be seen in the Example Box.
Here you can change the desktop background which will be displayed when a user logs in. You can have a single color or an image as a background. If you have an image as the background and select center, the selected background color will be used around the image if it isn't large enough to cover the entire desktop.
The background colors and effects are controlled by the options on the tab labeled Background and you select a background image and its placement from the options on the tab labeled Wallpaper.
To change the default background color(s) simply click either of the color buttons and select a new color.
The dropdown box above the color buttons provides you with several different blend effects. Choose one from the list, and it will be previewed on the small monitor at the top of the window. Your choices are:
By choosing this mode, you select one color (using the color button labeled Color 1), and the entire background is covered with this one color.
By choosing this mode, you select two colors (using both color buttons).
You then select a pattern by clicking Setup. This opens a new dialog window, which gives you the opportunity to select a pattern. Simply click once on the pattern of your choice, then click on OK, and KDE will render the pattern you selected using the two colors you selected. For more on patterns, see the section Background: Adding, Removing and Modifying Patterns.
By selecting this option, you can have KDE use an external program to determine the background. This can be any program of your choosing. For more information on this option, see the section entitled Background: Using an external program.
By choosing this mode, you select two colors (using both color buttons). KDE will then start with the color selected by Color 1 on the left edge of the screen, and slowly transform into the color selected by Color 2 by the time it gets to the right edge of the screen.
By choosing this mode, you select two colors (using both color buttons). KDE will then start with the color selected by Color 1 on the top edge of the screen, and slowly transform into the color selected by Color 2 as it moves to the bottom of the screen.
By choosing this mode, you select two colors (using both color buttons). KDE will then start with the color selected by Color 1 in each corner of the screen, and slowly transform into the color selected by Color 2 as it moves to the center of the screen.
By choosing this mode, you select two colors (using both color buttons). KDE will then start with the color selected by Color 1 in each corner of the screen, and slowly transform into the color selected by Color 2 as it moves to the center of the screen. The “shape” of this gradient is different then the pyramid gradient.
By choosing this mode, you select two colors (using both color buttons). KDE will then start with the color selected by Color 2 in the center of the screen, and slowly transform into the color selected by Color 1 as it moves to the edges, in an elliptical pattern.
The setup button is only needed for if you select Background program or Patterns. In these instances, another window will appear to configure the specifics.
Wallpaper
To select a new background image first, click on the Wallpapers tab, then you can either select an image from the drop-down list labeled Wallpaper or select Browse... and select an image file from a file selector.
The image can be displayed in six different ways:
No image is displayed. Just the background colors.
The image will be centered on the screen. The background colors will be present anywhere the image does not cover.
The image will be duplicated until it fills the entire desktop. The first image will be placed in the upper left corner of the screen, and duplicated downward and to the right.
The image will be duplicated until it fills the entire desktop. The first image will be placed in the center of the screen, and duplicated upward, downward to the right, and to the left.
The image will be placed in the center of the screen. It will be scaled to fit the desktop, but it will not change the aspect ratio of the original image. This will provide you with an image that is not distorted.
The image will be scaled to fit the desktop. It will be stretched to fit all four corners.
Allow Shutdown
Use these dropdown box to choose who is allowed to shut down:
None: No one can shutdown the computer using kdm. You must be logged in, and execute a command.
All: Everyone can shutdown the computer using kdm.
Root only: kdm requires that the root password be entered before shutting down the computer.
You can independently configure who is allowed to issue a shutdown command for the Console: and Remote: users.
Commands
Use these 3 blanks to define the exact shutdown command.
The shutdown command defaults to:
/sbin/shutdownThe restart command defaults to:
/sbin/rebootWhen Show boot options is enabled, kdm will on reboot offer you options for the lilo boot manager. For this feature to work, you will need to supply the correct paths to your lilo command and to lilo's map file.
Define which session types should be accessible from the login window.
For more information on this subject, look at /etc/X11/xdm/Xsession to find your xdm setup files. Also review the xdm man pages, especially under the SESSION PROGRAM section.
To add a session, type its name in the blank entitled New types, and click Add new.
To remove a session, select the session from the list and click Remove.
From here you can change the way users are represented in the login window.
You may disable the user list in kdm entirely in the Show Users section. You can choose from:
Don't show any users. This is the most secure setting, since an attacker would then have to guess a valid login name as well as a password. It's also the preferred option if you have more than a handful of users to list, or the list itself would become unwieldy.
Only show users you have specifically enabled.
Allows you to select a list of users that should not be shown, and all other users will be listed.
Independently of the users you specify by name, you can use the System UIDs to specify a range of valid UIDs that are shown in the list. By default user id's under 1000, which are often system or daemon users, and user id's over 65000, are not shown.
You can also enable the Sort users checkbox, to have the user list sorted alphabetically. If this is disabled, users will appear in the order they are listed in the password file.
If you choose to show users, then the login window will show images (which you select), of a list of users. When someone is ready to login, they may select their user name/image, enter their password, and they are granted access.
If you permit a user image, then you can configure the source for those images.
The available options for the User Image Source are:
You can configure the admin picture here, for each user on the system. Depending on the order selected above, users may be able to override your selection.
If you choose not to show users, then the login window will be more traditional. Users will need to type their username, and password to gain entrance. This is the preferred way if you have many users on this terminal.
Along the right edge of the window are two check boxes:
If Show users is selected, you have chosen to show images of users, instead of making them type their login name.
If Sort users is selected, then the list of users will be sorted alphabetically in the login window. If unchecked, users will be listed in the same order as they are on this page. If Show users is not checked, this has no effect.
Below the user image box, and above the Show users check box, is a set of two radio buttions:
Show only selected users: If this option is selected, only the users contained in the list labelled Selected Users, will be displayed in the login window. If Show users is not checked, this has no effect.
Show all users but no-show users: If this option is selected, all users will be listed, except those users contained in the list entitled No show users. If Show users is not checked, this has no effect.
This page contains three listboxes. The large listbox on the left shows all the users on the system which might be a genuine user.
The top rightmost listbox shows the selected users and the bottom rightmost listbox shows the users we don't want displayed in the login window.
To move a user from one listbox to another you click on the username in the listbox and click >> to move the user from the leftmost box the the rightmost box or << to move the user from the rightmost box to the leftmost box.
This section of the manual only applies if Show users is selected. If it is not, this image box has no effect.
Every user on the system can be represented by a image. The image for the user is kept in a file called $KDEDIR/share/apps/kdm/pics/users/$USER.xpm. If the user doesn't have such a file the file $KDEDIR/share/apps/kdm/pics/users/default.xpm will be used instead.
To assign a new image to a user just select the user in one of the listboxes and either drop an imagefile on the image button to the right or click on the image button and select a new image from the image selector.
If no user is currently selected you will be asked if you want to change the default image.
The replacement is performed by a Konqueror process so if the imagefile already exists you will be prompted by Konqueror if you want to replace it. If you confirm the image will be replaced - you will NOT have to press the Apply button.
In the convenience tab you can configure some options that make life easier for lazy people, like automatic login or disabling passwords.
Please think more than twice before using these options. Every option in the Convenience tab is well-suited to seriously compromise your system security. Practically, these options are only to be used in a completely non-critical environment, e.g. a private computer at home.
Automatic login will give anyone access to a certain account on your system without doing any authentication. You can enable it using the option Enable auto-login.
You can choose the account to be used for automatic login from the list labelled User:.
Using this feature, you can allow certain users to login without having to provide their password. Enable this feature using the Enable password-less logins option.
Below this option you'll see a list of users on the system. Enable password-less login for specific users by checking the checkbox next to the login names. By default, this feature is disabled for all users.
Again, this option should only be used in a safe environment. If you enable it on a rather public system you should take care that only users with heavy access restrictions are granted password-less login, e.g. guest.
The Automatically login after X server crash option allows you to skip the authentication procedure when your X server accidentally crashed.
You can also choose which user is “preselected” when kdm starts. The default is None, but you can choose Previous to have kdm default to the last successfully logged in user, or you can Specify a particular user to always be selected from the list. You can also have kdm set the focus to the password field, so that when you reach the kdm login screen, you can type the password immediately.
| Prev | Home | Next |
| The Login Window | Up | The Files kdm Uses for Configuration |
![]() | The Files kdm Uses for Configuration |
| Prev | Next |
This chapter documents the files that control kdm's behavior. Much of this can be also controlled from the KControl module, but not all.
The files that you may need to edit are:
The main configuration file for kdm
![]() | kdmrc |
| Prev | The Files kdm Uses for Configuration | Next |
kdmrc — The kdm Configuration File
The basic format of the file is “INI-like”. Options or “keys” have a name and a value, separated by a =, placed in sections. Keys are only valid in the sections they are defined for, and will not be applied (and a non-fatal error reported) if they are placed incorrectly. Some keys don't apply to particular displays, in which case they are ignored.
The format for all keys are key=value. Key names are case sensitive. Sections are denoted by [Name of Section]. Lines beginning with # are comments.
You can configure every X-display individually.
Every display has a display name, which consists of a host name (which is empty for local displays specified in the Xservers file), a colon and a display number. Additionally, a display belongs to a display class (which can be ignored in most cases; the control center does not support this feature at all).
Sections with display-specific settings have the formal syntax “[X-" host [":" number [ "_" class ]] "-" sub-section "]”
You can use the * wildcard for host, number and class. You may omit trailing components; they are assumed to be “*” then. The host part may be a domain specification like “.inf.tu-dresden.de”.
From which section a setting is actually taken is determined by these rules:
An exact match takes precedence over a partial match (for the host part), which in turn takes precedence over a wildcard.
Precedence decreases from left to right for equally exact matches
Example: display name "myhost:0", class "dpy"
[X-myhost:0_dpy] precedes
[X-myhost:0_*] (same as [X-myhost:0]) precedes
[X-myhost:*_dpy] precedes
[X-myhost:*_*] (same as [X-myhost]) precedes
[X-*:0_dpy] precedes
[X-*:0_*] (same as [X-*:0]) precedes
[X-*:*_*] (same as [X-*])
These sections do NOT match this display:
[X-hishost], [X-myhost:0_dec], [X-*:1], [X-:*]
If a setting is not found in any matching section, the default is used.
The kdmrc is very thoroughly commented, and this documentation is based on those comments. Every comment applies to the following section or key.
All comments will be lost if you change this file with the kcontrol frontend. The defaults refer to kdm's built-in values. Values set in kdmrc override the defaults, you do not need to set every key if those defaults already suit you.
The [General] section contains most of the global options, and will apply to every instance of kdm and every display.
If the value starts with a slash (/, this key specifies the file where X-Servers to be used by kdm are listed. The file is in the usual xdm Xservers format. If the value does not start with a slash, this key is interpreted as if it were a singleline of the Xservers file, i.e. it specifies exactly one X-server.
The default value is :0 local /usr/X11R6/bin/X
During installation, kdm will try to fill in the path to an existing Xservers file if it can find one.
Where kdm should store it's PID. The default is to leave this key empty, which means “don't store”. You might want to set instead a full path, for example /var/run/xdm.pid so that you can check with a script if kdm is running or not.
Whether kdm should lock the PID file to prevent having multiple kdm instances running at once. Leave it to “true”, unless you are brave. This will have no effect unless you set the PidFile first.
Where to store authorization files. The default is /var/run/xauth.
Whether kdm should automatically re-read configuration files, if it finds they have changed. The default is “true”, and you should probably not need to change it.
Additional environment variables kdm should pass to kdm_config, kdm_greet, Xsetup, Xstartup, Xsession and Xreset.
A good candidate is LD_LIBRARY_PATH. The format is:
ExportList=SOME_VAR,ANOTHER_IMPORTANT_VAR
Where kdm should fetch entropy from. The default is /dev/mem. You should not need to change this.
Where the command FiFos should be created. Make it empty to disable the FiFos. The default is /var/run/xdmctl
To which group the command FiFos should belong. The default is -1, effectively root.
This option exists solely for the purpose of clean automatic upgrades. Do not change it, you may interfere with future upgrades and this could result in kdm failing to run.
This section configures remote logins via the XDMCP.
Keys for the [Xdmcp] Section of kdmrc
Whether kdm should listen to XDMCP requests. The default is true
The UDP port kdm should listen on for XDMCP requests. The default is 177 and this should not be changed.
File with the private keys of X-terminals. Required for xdm authentication. The default is to leave this key empty.
XDMCP access control file, in the usual xdm Xaccess format.
The default is a file named Xaccess in the same folder as kdmrc. You could put the path to your working xdm Xaccess file here.
Number of seconds to wait for display to respond after the user has selected a host from the chooser. The default value is 15
Strip the domain name from the remote display names, if it is equal to the local domain. The default is true.
Use the numeric IP address of the incoming connection instead of the host name. Use this on multihomed hosts. The default is false.
The program which is invoked to dynamically generate replies to XDMCP Broadcast query requests.
By default, no program is invoked, and “Willing to manage” is sent in reply.
You could put a path here to an existing Xwilling if you have already configured one.
Keys for the [Shutdown] Section of kdmrc
The command to run to halt the system. The default is /sbin/shutdown -h now
The command to run to reboot the system. The default is /sbin/shutdown -r now
Whether one can shut down the system via the global command FiFo
The default is False.
Whether one can abort still running sessions when shutting down the system via the global command FiFo.
The default is true.
This will have no effect unless you previously set the key AllowFifo.
Core configuration for all displays. Times are specified in seconds unless noted otherwise.
Some rough estimations how many seconds kdm will spend at most performing certain actions:
OpenRepeat * (OpenTimeout + OpenDelay)
ServerAttempts * ServerTimeout
StartAttempts * (ServerTime + OpenTime)
StartAttempts * OpenTime
Keys for the [X-*-Core] Section of kdmrc
How long to wait after various errors before retrying to start the display. The default is 15.
How long to wait before timing out XOpenDisplay. The default is 120.
How often to try the XOpenDisplay. The default is 5.
Try at most this many times to start a display. If this fails, the display is disabled. The default is 4.
The StartAttempt counter is reset after this many seconds. The default is 30.
Ping the remote display every this many minutes. The default is 5
Wait this long for a reply to a ping. The default is 5.
Restart instead of resetting the local X-Server after session exit. Use this if you find that the server is leaking memory or otherwise not releasing resources. The default is False.
The signal needed to reset the local X-Server. The default is 1 which is SIGHUP.
The signal needed to terminate the local X-Server. The default is 15 which is SIGTERM.
Set if necessary to reset the X-Server to make it read the initial Xauth file.
The default is false
Create X-authorizations for local displays. The default is true.
Which X-authorization mechanisms should be used.
The default is XDM-AUTHORIZATION-1,MIT-MAGIC-COOKIE-1 and you should be very careful changing this unless you are sure you know what you are doing.
The name of this X-Server's Xauth file. The default is to leave this key empty, which means that a random name in the AuthDir will be used.
Specify a file with X-resources for the greeter, chooser, and background. The KDE frontend doesn't take any notice of this, so you don't need it unless you use an alternative chooser, or another background generator than kdmdesktop
The xrdb program to use to read the above specified resources. The default is /usr/X11R6/bin/xrdb.
A program to run before the greeter is shown. You should start kdmdesktop there. Also, xconsole can be started by this script. The default is to leave this key empty.
A program to run before a user session starts. You should invoke sessreg there, and optionally change the ownership of the console etc..
A program to run after a user session exits. You should invoke sessreg there and optionally change the ownership of the console, etc..
The program which is run as the user which logs in. It is supposed to interpret the session argument (see SessionTypes) and start an appropriate session according to it.
The default is /usr/X11R6/bin/xterm -ls -T, but if kdm can locate an already configured Xsession file during installation, the path to this will be filled in instead.
The program to run if Session fails.
The default is /usr/X11R6/bin/xterm.
The PATH for the Session program. The default is /bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin
The path for Setup, Startup and Reset, etc..
The default is /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin.
The default system shell. The default is /bin/sh
Where to put the user's X-Server authorization file if ~/.Xauthority cannot be created. The default is /tmp.
If true, kdm will automatically restart a session after an X-Server crash, or if it is killed by Ctrl+Alt+Delete. The default is false.
Enabling this opens a security hole: a secured display lock can be circumvented, unless you are using KDE's built-in screen lock.
Allow root logins. The default is true.
Allow to log in when the user has an empty password. Default is true.
Who is allowed to shut down the system. This applies both to the greeter and to the command FiFo. The default is All.
Possible values are:
No Shutdown... button is shown at all.
The root password must be entered to shut down.
Everybody can shut down the machine.
Who is allowed to abort all still running sessions when shutting down. The possible values are the same as for AllowShutdown, and the default is All
The default choice for shutdown condition/timing.
Possible values are:
Shutdown after all sessions exit (possibly at once.) This is the default.
Shutdown, if no sessions are open, otherwise do nothing.
Shutdown unconditionally.
If this is false, the user must select the shutdown condition/timing directly in the shutdown dialog. If this is true, he won't be shown the options but will be asked what to do if any sessions are actually open. The default is true.
The interaction is currently not implemented. If this is set to true, a normal forced shutdown will happen, ignoring the value of the AllowSdForceNow option!
Where, relative to the user's home folder, to store the last selected session. The default is .wmrc.
Greeter configuration for all displays.
Keys for the [X-*-Greeter] section of kdmrc
Session types the users can select. It is advisable to have default and failsafe listed here (this is the default)
Widget style of the greeter. Available are Default, Windows, Platinum, Motif, MotifPlus, CDE, SGI and any other styles you have installed, such as Keramik or HighColor.
The default is Default.
Color scheme of the greeter. The default is Default. Any color scheme you have installed, such as Pumpkin can be used here.
What should be shown beside the input lines.
The available values are:
The image specified by LogoPixmap. This is the default
An analog clock
Nothing
The image to show when LogoArea=Logo. Default is kdelogo.png.
Normally the greeter is centered on the screen. Use these options of you want it to appear elsewhere on the screen. The default is for GreeterPosFixed to be set to false, in which case setting the other two options will have no effect.
The headline in the greeter.
The following characters are replaced by their value:
Current display.
host name, possibly with the domain name.
Node name, most probably the host name without the domain name.
The operating system
The operating system version
The machine (hardware) type
A single %
The default string is Welcome to %s at %n.
The font for the headline. The default is charter,24,bold
The normal font used in the greeter. The default is helvetica,12.
The font used for the Login Failed message. Default is helvetica,12,bold.
Whether the fonts shown in the greeter should be antialiased. The default is false
What to do with the Num Lock modifier for the time the greeter is running.
Turn on Num Lock
Turn off Num Lock
Don't change the state (this is the default.)
Language to use in the greeter. The default is en_US.
Specify which user names (and pictures) should be shown in the greeter.
Available values are:
All users except those listed in HiddenUsers. This is the default.
Only the users listed in SelectedUsers
No user list will be shown at all. Users must type in a correct login name.
Only takes effect if ShowUsers is set to Selected. Make a comma separated list of usernames to show here.
Only takes effect if ShowUsers is set to NotHidden. Make a comma separated list of usernames to hide here.
This is a special case for HiddenUsers. In addition to usernames specified there, users with a UID less than this number (other than root will also be hidden. The default is 0.
Complement to MinShowID. Users will a UID greater than this number will be hidden as well. The default is 65535.
If false, the users are listed in the order they appear in /etc/passwd. If true, they are sorted alphabetically. The default is true.
Specify where the users' pictures should be taken from. Available values are:
From $KDEDIR/share/apps/kdm/pics/users/$USER.png. This is the default.
From the user's $HOME/.face.
Prefer $USER.png, fall back on $HOME/.face.
The other way around.
Specify if, and if so, which, user should be preselected for login.
Enabling this feature may be considered a security hole, since it presents a known to be valid login name to a potential attacker, so he “only” needs to guess the password.
Available values are:
Don't preselect any user. This is the default.
The user that successfully logged in last.
The user specified in the key DefaultUser.
The user to preselect if PreselectUser is set to Default.
If this is true, the password input field is automatically focused if a user is preselected. The default is False.
The password input field cloaks the typed in text. Here you can specify how to do it:
Nothing is shown at all. The cursor doesn't move.
* is shown for every typed letter. This is the default.
*** is shown for every typed letter.
If true, kdm will set the background via krootimage. Otherwise the Setup script should be used to set up the background. The default is true
The configuration file to use for krootimage if UseBackground is set to true. The default is $KDEDIR/share/config/kdm/backgroundrc
Hold the X-Server grabbed the whole time the greeter is visible. This may be more secure, but it will disable any background and other X clients started from the Setup script. The default is false
How many seconds to wait for the grab to succeed.
Warn if local X authorization cannot be created. The default is true. This option is not implemented yet, so changing it will have no effect.
Core configuration for local displays.
Keys for the [X-:*-Core] section of kdmrc
How often to try to run the X-Server. Running includes executing it, and waiting for it to come up. The default is 1.
The same as for the [X-*-Core] section.
Enable password-less logins on this display. Use with extreme care! The default is false.
The users that don't need to provide a password to log in. Never list root.
Greeter configuration for local displays
Keys for the [X-:*-Greeter] Section of kdmrc
The same as for the [X-*-Greeter] section.
The screen the greeter should be displayed on in multi-headed setups. The numbering starts with 0 and corresponds to the listing order in the active ServerLayout section of XF86Config. -1 means to use the upper-left screen, -2 means to use the upper-right screen. The default is 0.
Specify whether the greeter of local displays should start up in host chooser (remote) or login (local) mode and whether it is allowed to switch to the other mode.
Available values are:
Only local login possible. This is the default.
Only choice of remote host is possible.
Start up in local mode, but allow switch to remote mode.
Start up in remote mode, but allow switch to local mode.
Comma separated list of hosts to be automatically added to the remote login menu. The special name * means broadcast. The default is *.
Core configuration for just the first local display
Keys for the [X-:0-Core] Section of kdmrc
Enable automatic login on this display. Use with extreme care!
The user to log in automatically. Never specify root.
The password for the user to log in automatically. This is not required unless the user is logged into a NIS or Kerberos domain. If you use this option, you should chmod 600 kdmrc for obvious reasons.
The session for the user to log in automatically. This becomes useless after the user's first login, as the last used session will take precedence.
| Prev | Home | Next |
| The Files kdm Uses for Configuration | Up | Configuring your system to use kdm |
| Prev | Home | Next |
| Configuring kdm | Up | kdmrc |
![]() | Configuring your system to use kdm |
| Prev | Next |
This chapter assumes that your system is already configured to run the X Window System, and that you only need to reconfigure it to allow graphical login.
The fundamental thing that controls whether your computer boots to a terminal prompt (console mode) or a graphical login prompt is the default runlevel. The runlevel is set by the program /sbin/init under the control of the configuration file /etc/inittab. The default runlevels used by different UNIX® systems (and different Linux® distributions) vary, but if you look at /etc/inittab the start of it should be something like this:
# Default runlevel. The runlevels used by RHS are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) id:3:initdefault:
All but the last line of this extract are comments. The comments show that runlevel 5 is used for X11 and that runlevel 3 is used for multi-user mode without X11 (console mode). The final line specifies that the default runlevel of the system is 3 (console mode). If your system currently uses graphical login (for example, using xdm) its default runlevel will match the runlevel specified for X11.
The runlevel with graphical login (xdm) for some common Linux® distributions are:
5 for Red Hat® 3.x and later, and for Mandrake™
4 for Slackware
3 for SuSE®. 4.x and 5.x
The first step in configuring your system is to ensure that you can start kdm from the command line. Once this is working, you can change your system configuration so that kdm starts automatically each time you reboot your system.
To test kdm, you must first bring your system to a runlevel that doesn't run xdm. To do so, issue a command like this:
/sbin/init 3Instead of the number 3 you should specify the appropriate runlevel for console mode on your system.
If your system uses Pluggable Authentication Modules (PAM), which is normal with recent Linux® and Solaris systems, you should check that your PAM configuration permits login through the service named kde. If you previously used xdm successfully, you should not need to make any changes to your PAM configuration in order to use kdm. /etc/pam.conf or /etc/pam.d/kde. Information on configuring PAM is beyond the scope of this handbook, but PAM comes with comprehensive documentation (try looking in /usr/share/doc/*pam*/html/).
Now it's time for you to test kdm by issuing the following command:
kdm -nodaemon
If you get a kdm login dialog and you are able to log in, things are going well. The main thing that can go wrong here is that the run-time linker might not find the shared Qt™ or KDE libraries. If you have a binary distribution of the KDE libraries, make sure kdm is installed where the libraries believe KDE is installed and try setting some environment variables to point to your KDE and Qt™ libraries.
For example:
export KDEDIR=/opt/kde export QTDIR=/usr/lib/qt2 export PATH=$KDEDIR/bin:$QTDIR/bin:$PATH export LD_LIBRARY_PATH=$KDEDIR/lib:$QTDIR/lib
If you are still unsuccessful, try starting xdm instead, to make sure that you are not suffering from a more serious X configuration problem.
When you are able to start kdm successfully, you can start to replace xdm by kdm. Again, this is distribution-dependent.
For Red Hat®, edit /etc/inittab, look for the string xdm and replace it with kdm (including all paths).
For Mandrake™, the X11 runlevel in /etc/inittab invokes the shell script /etc/X11/prefdm, which is set up to select from amongst several display managers, including kdm. Make sure that all the paths are correct for your installation.
For SuSE®, edit /sbin/init.d/xdm to add a first line:
. /etc/rc.config DISPLAYMANAGER=kdm export DISPLAYMANAGER
For FreeBSD, edit /etc/ttys and find the line like this:
ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secureand edit it to this:
ttyv8 "/usr/local/bin/kdm -nodaemon" xterm on secure
Most other distributions are a variation of one of these.
At this stage, you can test kdm again by bringing your system to the runlevel that should now run kdm. To do so, issue a command like this:
/sbin/init 5
Instead of the number 5 you should specify the appropriate runlevel for running X11 on your system.
The final step is to edit the initdefault entry in /etc/inittab to specify the appropriate runlevel for X11.
Before you make this change, ensure that you have a way to reboot your system if a problem occurs. This might be a “rescue” floppy-disk provided by your operating system distribution or a specially-designed “rescue” floppy-disk, such as tomsrtbt. Ignore this advice at your peril.
When you reboot your system, you should end up with the graphical kdm login dialog.
If this step is unsuccessful the most likely problem is that the environment used at boot time differs from the environment that you used for testing at the command line. If you are trying to get two versions of KDE to co-exist, be particularly careful that the settings you use for your PATH and LD_LIBRARY_PATH environment variables are consistent, and that the startup scripts are not over-riding them in some way.
| Prev | Home | Next |
| kdmrc | Up | Supporting multiple window managers |
![]() | Supporting multiple window managers |
| Prev | Next |
The main dialog box for kdm includes a Session Type: drop-down box, which allows you to select a window manager to use for your session. This chapter describes the changes that you must make to your configuration files in order to support this feature.
The options that appear in the Session Type: drop-down box are configured by entries in the KDM section of kdmrc.
When you log in using kdm, the shell script Xsession is executed. The session type that you select is passed as a command-line argument. (Xsession can be found in /etc/X11/xdm/ for Redhat and Mandrake, and in /usr/X11R6/lib/X11/xdm/ for S.u.S.E.). Whilst debugging, you might find it helpful to add this line to Xsession:
echo "$0 || $1 || $2" > $HOME/.Xsession_args
How you proceed now depends upon how your system usually starts up window managers. Here are two different approaches, with examples of the changes that you must make:
The window manager is started by commands within Xsession. In this case, you can add a case statement to start the appropriate window manager. Linux Mandrake uses this approach; here is an extract from Xsession:
# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
case $1 in
kde)
source /opt/kde2/bin/kde1
exec startkde
;;
kde2)
source /opt/kde2/bin/kde2
exec startkde
;;
failsafe)
exec xterm -geometry 80x24-0-0
;;
default)
;;
*)
exec /bin/sh -c "$(/usr/sbin/chksession -x=$1)"
;;
esac
esac
The window manager is started by another script that is invoked by Xsession. In this case you must ensure that the parameter passed to Xsession is passed on to that other script. For example, if the window manager is started like this:
exec $startupyou would need to change it to:
exec $startup$@Having made this change, you must trace your way through the startup to find the place where the window manager is started. One approach uses xinitrc to start the window manager; this allows a system-wide file /etc/X11/xinit/xinitrc or a user-specific file $HOME/.xinitrc to be used. If you edit $HOME/.xinitrc, you may want to save a copy in /etc/skel, so that it will be automatically generated in every user account you create from now on. Here is an example xinitrc for a system using this approach:
#!/bin/bash
#
# .xsession/.xinitrc
#
# choose a window manager
#
defaultwm=kde
#set the window manager to $1 if it was supplied
windowmgr=${1:-$defaultwm}
#start the respective window managers
case ${windowmgr} in
kde|kwm|kdestart)
WINDOWMANAGER=startkde
;;
fvwm|fvwm2)
WINDOWMANAGER=fvwm2
;;
fvwm95)
WINDOWMANAGER=fvwm95
;;
*) WINDOWMANAGER=windowmgr # default for unknown wm's
esac
#
# load resources
#
if [ -f /usr/X11R6/lib/X11/Xmodmap ]; then
xmodmap /usr/X11R6/lib/X11/Xmodmap
fi
if [ -f ~/.Xmodmap ]; then
xmodmap ~/.Xmodmap
fi
if [ -f ~/.Xdefaults ]; then
xrdb -merge ~/.Xdefaults
fi
if [ -f ~/.Xresources ]; then
xrdb -merge ~/.Xresources
fi
#
# finally start the window manager
#
exec $WINDOWMANAGER
| Prev | Home | Next |
| Configuring your system to use kdm | Up | Using kdm for Remote Logins (XDMCP) |
![]() | Using kdm for Remote Logins (XDMCP) |
| Prev | Next |
XDMCP is the Open Group standard, the “X Display Manager Control Protocol”. This is used to set up connections between remote systems over the network.
XDMCP is useful in multiuser situations where there are users with workstations and a more powerful server that can provide the resources to run multiple X sessions. For example, XDMCP is a good way to reuse old computers - a Pentium or even 486 computer with 16 Mb RAM is sufficient to run X itself, and using XDMCP such a computer can run a full modern KDE session from a server. For the server part, once a single KDE (or other environment) session is running, running another one requires very few extra resources.
However, allowing another method of login to your machine obviously has security implications. You should run this service only if you need to allow remote X Servers to start login sessions on your system. Users with a single UNIX® computer should not need to run this.
| Prev | Home | Next |
| Supporting multiple window managers | Up | Other sources of information |
![]() | Other sources of information |
| Prev | Next |
Since kdm is descended from xdm, the xdm man page may provide useful background information. For X-related problems try the man pages X and startx. If you have questions about kdm that aren't answered by this handbook, take advantage of the fact the kdm is provided under the terms of the GNU Public License: look at the source code.
| Prev | Home | Next |
| Using kdm for Remote Logins (XDMCP) | Up | Credits and License |
![]() | Credits and License |
| Prev | Next |
kdm is derived from, and includes code from, xdm (C) Keith Packard, MIT X Consortium.
kdm 0.1 was written by Matthias Ettrich. Later versions till KDE 2.0.x were written by Steffen Hansen. Some new features for KDE 2.1.x and a major rewrite for KDE 2.2.x made by Oswald Buddenhagen.
Other parts of the kdm code are copyright by the authors, and licensed under the terms of the GNU GPL. Anyone is allowed to change kdm and redistribute the result as long as the names of the authors are mentioned.
kdm requires the Qt library, which is copyright Troll Tech AS.
Documentation contributors:
Documentation written by Steffen Hansen <stefh@dit.ou.dk>
Documentation extended by Gregor Zumstein<zumstein@ssd.ethz.ch>. Last update 1998/07/09
Documentation revised for KDE 2 by Neal Crook<nac@forth.org>. Last update 2000/07/06
Documentation extended and revised for KDE 2.2 by Oswald Buddenhagen<ossi@kde.org>. Last update 2001/07/XXX
Documentation copyright Steffen Hansen, Gregor Zumstein, Neal Crook and Oswald Buddenhagen. This document also includes large parts of the xdm man page, which is (C) Keith Packard.
This documentation is licensed under the terms of the GNU Free Documentation License.
This program is licensed under the terms of the GNU General Public License.
| Prev | Home | Next |
| Other sources of information | Up | Building and Installing kdm |
![]() | Building and Installing kdm |
| Prev | Next |
kdm is part of the KDE project. The various component parts of the KDE project are broken into sections, called packages. kdm is part of the package called kdebase. You can get KDE source code from various Linux and BSD distribution CDs, or by download from www.kde.org or its mirrors. If you have an out-of-date source code tree, you can use one of the KDE cvsup servers to bring it up-to-date whilst using minimal network bandwidth.
Before building kdebase, you must have built and installed (in this order) version 2 of the qt library and the KDE packages kdesupport (optionally) and kdelibs.
In order to build any of the above, you must already have the X Window System installed, together with a C++ compiler XXXXXXXXXX - the following applies only to a build from CVS and the GNU configuration tools automake and autoconf.
If the last few paragraphs seemed like a foreign language, then either you have strayed into an Inappropriate Area of this handbook, or you are about to undergo a Great Learning Experience.
If you managed to satisfy all of the prerequisites, you are unlikely to have any problems with building and installing kdebase. kdm is installed in your $KDEDIR/bin folder.
make install will NOT overwrite your previous kdm config files including kdmrc.
| Prev | Home | Next |
| Credits and License | Up | Glossary |
![]() | Glossary |
| Prev |
| Prev | Home | |
| Building and Installing kdm | Up |
| Next | ||
| Introduction |