Xdm

From Nekochan
Jump to: navigation, search
xdm login screen

X-Window System Display Manager

When you connect over the network it displays a login screen for XDMCP type programs like Xnest.

eg from a Apple Mac running OS-X:

    Xnest :1 -query mickey




Ports and firewalls

The XDM port and the X Font Server port must be open for this to work. The default XDM port is 177 and the default Font Server port is 7100.

Try this:

 more /etc/services


If you have problems connecting to an XDM session try turning all the firewalls off. Then turn the firewalls back on a create whatever rules are needed.


Problem and Solution

I've been attempting to set up xscreensaver on my Octane. I'm trying to follow the example in the xscreensaver man page to launch it at the XDM login screen (when nobody is logged in). The man page says to modify the Xsetup file and this is where I'm encountering problems.

I've modified xdm-config to contain entries for Xsetup / Xsetup-remote modeled after those for Xstartup / Xstartup-remote. I've created the Xsetup script and marked it as executable. I've restarted XDM a number of times and the whole machine once (just in case).

Solution

The DisplayManager*grabServer resource in xdm-config must be set to False in order for xdm to even attempt to execute Xsetup. This value is set to True in the default xdm-config. After making this change I'm seeing Xsetup executed as expected when the login screen comes up.


Here is the patch to support XScreenSaver 5.10 at the XDM/clogin screen: Attachment:

 xscreensaver.xdm_support.20091229a.diff.gz [1.21 KiB] 

Not downloaded yet

Caveats This seems to work OK on my system using the flurry GL hack (Octane/MXE). Please note that I have not tested XScreenSaver 5.10 thoroughly on my system so there could be bugs or other issues that have crept in either with this patch or the new version of XScreenSaver.

To build Obtain xscreensaver-5.10.tar.gz and unzip/untar it into a working directory. Apply the attached patch (e.g. patch < xscreensaver.xdm_support.20091229a.diff after unzipping) from within the extracted xscreensaver-5.10 directory. Set/export CFLAGS=-D_SGI_SOURCE ./configure --prefix=/usr/nekoware gmake

To install WARNING: This will copy the binaries, etc. into various directories on your system. Because this is not yet a tardist you will need to manually track down and remove anything that was installed if you want to uninstall this patched version of XScreenSaver from your system. TODO: Create a tardist for this patched version of XScreenSaver to enable easy install/uninstall. Ensure you have uninstalled any other versions of XScreenSaver. gmake install (need to do this as root). Make sure the setuid bit is set on the xscreensaver binary.

To set up XScreenSaver for XDM/clogin Enable XDM's use of the Xsetup script (executes before bringing up clogin): Edit /var/X11/xdm/xdm-config: Add entries for DisplayManager*setup and DisplayManager._0.setup et al. Use the startup entries as examples of how to do this. Set DisplayManager*grabServer to False. This will enable use of the Xsetup script. Create an empty /var/X11/xdm/Xsetup-remote shell script, e.g.: Code:

  1. !/bin/sh
  2. Xsetup

Create the /var/X11/xdm/Xsetup shell script. This script should kill off any user instances of xscreensaver and relaunch it as root for the login screen (note that xscreensaver will setuid itself to nobody in this case), e.g.: Code:

  1. !/bin/sh
  2. Xsetup
  3. Kill off any user xscreensaver processes and relaunch it for the login screen.

PATH=$PATH:/usr/nekoware/bin:/usr/nekoware/libexec/xscreensaver xscreensaver-command -exit xscreensaver & Modify the /var/X11/xdm/Xsession shell script to kill off the login screen's xscreensaver instance and launch one for the user, e.g. add the following to the top of the file: Code:

  1. Kill off the xscreensaver process from the login screen and relaunch it for the user.

PATH=$PATH:/usr/nekoware/bin:/usr/nekoware/libexec/xscreensaver xscreensaver-command -exit xscreensaver & Modify /usr/lib/X11/app-defaults/XScreenSaver to contain the configuration you desire for the login screen's screensaver. Note that this will also become the default screensaver configuration for any logged-in users (they can override this in their own .xscreensaver files). TODO: Figure out a way to specify this configuration without modifying the defaults; putting a .xscreensaver file in root's home directory doesn't seem to work. It's a good idea to set *lock to False here although I believe blanking at the login screen should still work even if you don't.

I think that's it. Please let me know how this goes if you try it out.

See Also