MLUG: RE: XDM and [MLUG] X environment variables
RE: XDM and [MLUG] X environment variables
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
> Excellent (in my best Mr. Burns voice).  That worked like a charm
> ...../xterm -/+ls

Hmmmm... this will work for xterms, but will fail for everything that you
start through the window manager.  For example, if you start emacs by
clicking on a menu item, then it will not know about anything set in your
.bash_profile.

One way to resolve this neatly is to include a line in
/etc/X11/xdm/Xsession before the window manager gets started that looks
like:

[ -f "$HOME/.bash_profile" ] && . $HOME/.bash_profile

The hardest part is working out which files get executed and the order in
which it is done.  Below are some notes that I wrote to myself some time
ago for when I forget how this works under RedHat.  I hope they may be of
help - they are the result of going through several different man pages
and some testing.

Note that this also mentions how to change the default window manager that
gets started.

Cheers, Rob


kdm/xdm/gdm

A brief description of how kdm/xdm work.  Most of this applies to gdm as
well, but xdm/kdm share the directory /etc/X11/xdm for their configuration
files.  gdm does similar things out of /etc/X11/gdm (it contains pointers
to the xdm scripts).

kdm is started by init when runlevel 5 is entered.  It is started with
the line
         x:5:respawn:/etc/X11/prefdm -nodaemon
which runs prefdm.

prefdm looks for the file /etc/sysconfig/desktop which should contain a
single line with the prefered window manager.  For example "KDE" makes kdm
run. kdm has its config files in /etc/X11/xdm.  When it is first run it
takes its resources from xdm-config.  The manual page for xdm documents
the resources that may be set in this file.  Of particular interest:

DisplayManager.servers:        /etc/X11/xdm/Xservers
This is the file that contains the path to the X server and includes any
arguments to give to the server.  In particular, to enable video power
management you need to add the option "dpms" here.

DisplayManager._0.setup:       /etc/X11/xdm/Xsetup_0
The file that sets up the login screen that users see.

DisplayManager._0.startup:      /etc/X11/xdm/GiveConsole
DisplayManager._0.reset:       /etc/X11/xdm/TakeConsole
These are run as root before the user logs in and after the user logs out,
respectively.  Here they are just user to control the console.

DisplayManager*session:        /etc/X11/xdm/Xsession
The file to start the user's session.  This again checks the desktop file
to run your favourite wm.  You must source files here like /etc/profile
that are normally only sourced on login.


--
To manage your subscription, go to http://mlug.missouri.edu/members/edit.php

Archives are available at http://mlug.missouri.edu/list-archives/