Readme for Xlogin-1Beta1 Note: At the moment all sessions run with access controls disabled, even those started with xdmcp, the readme describes how it *should* work, not how it currently works. This is beta quality software, its stable and feature complete but parts of it simply refuse to work as designed. Currently the biggest problem is that xauthority creates a cookie for the user (see RAWX11 desktop script) - snag is it doesn't seem to work..... Whats this for: xlogin is a login manager similar in function to xdm, gdm, kdm etc. It does not use any xdm code and has very few dependencies. Features : * Everything is available on the command line, great for use with init * Supports simple shell scripts for starting each desktop environment * Use command line switches to enforce policy (desktops, wallpapers etc) * all settings stored in /etc/ - no hunting for settings or hastles with backups * automatic logins available with -autologin command line switch and xlogin-makeidentity utility * Persistant connection attempts to X servers, configure displays and turn it on/off at will * xdmcp server with MIT-COOKIE-1 authentication Motivation: I am not a fan of the way xdm is administered and I like gdm even less. The idea behind xlogin is to write a small fast login dialog thats easy to administer, its not the most attractive login in the world. xlogin is crude, requires very little to build and install hence is suitable for small or embedded systems. Its use of X server retries for XOpen makes it suitable for running from init and tolerant of displays that are not always on/available. Personally I dont like "click on user" logins, this does not try to look like Windows XP ! Its closer to a text console login, a feeling enforced by the use of a fixed font. Security: You can chose between using xdmcp with MIT-COOKIE-1 (poor security) or running with access controls dissabled (no security). This is not a defect of this package but simply the design of X, if you want secure X then you need to add encryption to it, ssh is the most common way. XDMCP: X Display Management Control Protocol. Basically this is pretty simple protocol and xlogins implementation is even simpler. The idea is that an X display requests a session using the -query argument. For example: X -query myserver :1 The XDMCP server takes that REQUEST and replies an ACCEPT responce, that accept response contains the cookie (random number that will be used to identify clients in all subsequent X transactions) and a sessionID (another unique number). Having done that xdmcp-server lanunches an xlogin to satisfy the request. In most implementations the xdmcp server and the login code are rolled into one executable (xdm/gdm/kdm). In this system they are seperate executables. This is simpler for the user to understand and makes life easy to see whats going on, the down side is that the proper implimentation of xdmcp requires the login code and the xdcp server to share some information. xlogin passes the MIT cookie to the xlogin code through the environment (environment variables). This is clean ish as any hacker would be hard pushed to extract the environment from a process they dont own. At the moment xlogin-xdmcpserver does not support indirect queries (chooser), but this may be added later. xlogin-xdmcpserver is hard coded to use UDP port 177, the default for this protocol. If you need to change it a #define is at the top of the source file. Hows it works: xlogin is designed to be started from init, when started it will connect to the display named in the command line -display argument or :0 if omitted. It tries to connect repeatedly incase the display is down or unreachable. The desktop names offered to the users are the shell script names from the /etx/xlogin/desktops directory. Each one of these scripts is used to start a desktop environment. The user can select the desired desktop by clicking on it (at any point) as well as enter a username/password. If the username/password pair authenticates correctly then the xlogin process swpans a bash session by setting the user id and group id to that of the user, modifying its environment to include the new HOME and DISPLAY variables then launching the selected shell (desktop) from files in /etc/xlogin. The script starts the X session, this shell waits for all its child processes (the desktop itself) to terminate before exiting itself. If run from init this shell exit causes init to spawn another login for the terminal. Dependency: xlogin requires a working bash (not sh!) - it uses shadow passwords and is probably only suitable for linux without modification. It uses the "hostname" utility to read the systems hostname as well as the "ls" utility. Requires gcc with a working xlib, libcrypt (-lcrypt) for background images libjpeg. People wishing to contribute code should have in mind that one of my main goals was to have the minimum number of dependencies in the code, so dont bother to pull in your favorite toolkit and then sending me a patch ! At the moment the keyboard code looks crappy, the encryption of identities could be improved. Desktops: The files /etc/xlogin/desktops are shell scripts used to start a desktop. You can customize them simply or add new ones. The FIREFOX script tries to give a Kiosk type firefox session with no window manager ! The snag is that the firefox command line options seem to be broken so the X server resolutions needs to be bodged into the firefox configuration file. This may BREAK firefox for that user, you have been warned. I recommend creating a special user to test. After install remove any unwanted desktop files from the directory. Some more files are in the desktops directory of the source package, not all are copied in as default - feel free to write new ones and submit them. Arguments: xlogin can use the following arguments. The most useful is the -display argument, an IP or hostname can be used together with a display number. Here are some example display names "mypc:1" "192.168.1.231:1" "127.0.0.1:1" xlogin: