XDM/bash profile hints to people

Sam Halliday fommil at yahoo.ie
Thu Jul 17 09:24:20 PDT 2003


hi there,

after the thread a few weeks ago about bash profiles, my login procedures have
taken a massive overhaul. in the prodecure, i managed to fix a few things about
xdm which i think are noteworthy. i was going to write a hint, but i dont have
the time to write one right now:

as dagmar kept pointing out (almost violently ;-D), bash is not your shell when
you start XDM. This leads to a problem in that window managers started from a
graphical XDM login do not have their PATH or LC_ALL's set correctly (amoung
other parameters).

First some notable files. when someone logs into xdm, it first executes
   /etc/X11/xdm/GiveConsole
as root user (we will come to this in a moment), and then
  /etc/X11/xdm/Xsession
as the user which logged in.

Xsession is what you should customise to enter the system's default login window
manager (or new users will get landed with twm and xsess). this is also the file
where we can set the PATH etc for the window manager to see. We can do this one
of two ways, we can either have the lines:
  if [ -f /etc/profile ] ; then
    . /etc/profile
  fi
  if [ -f ~/.profile ] ; then
    . ~/.profile
  fi
in that file, or we can set the envars explicitly. i reccomend entering those
lines, so that the user gets what is expected.

now... there is also a standard "bug" (more of a not-implemented-by-default
feature) with XDM, in that if you login, you are not registered! i noticed this
when people were `finger`ing me and thinking i hadnt logged on in days. This is
remedied in /etc/X11/xdm/GiveConsole (Note: the xdm man page is slightly out of
date on this one, and says Xstartup is where this goes) by adding the following
lines into GiveConsole:

  # Register the user's login
  sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME

and the complementary lines in /etc/X11/xdm/TakeConsole

  # Unregister the user's login
  sessreg -d -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME

note that these files are also where you could do NFS mounting and so forth

see xdm-config for the pointers to these files, and setting up for multiple
consoles should be obvious.

This standard setup allows for users to create a .xsession file which is their
own personal window manager setup script.

this sets up all the XDM stuff which was giving people (especially me) grief,
and means we are using the standard setup: its quite reasonable, i guess it is
just a little unobvious without reading into the docs, and not ready to use
as-is. i might pick up on the bash profiles stuff sometime... the number of
people's .bashrc's that just source /etc/profile and ~/.profile is just
terrible! its the sign of a dodgy system-wide setup.

xdm can actually look quite good, (even a background picture and everything!) if
you spend the time on it [read: edit /etc/X11/xdm/Xresources
/etc/X11/xdm/Xsetup_0].

i have the LFS penguins background with the login greeting text background
colour the same as the picture so it looks like the text is just overwritten on
top of the picture. just an example.

hope this helps some people out!

Sam
-- 
Satire does not look pretty upon a tombstone.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-support/attachments/20030717/76566ef9/attachment.sig>


More information about the blfs-support mailing list