Date: Sun, 13 Apr 2014 17:45:02 +0200 From: Polytropon <freebsd@edvax.de> To: Antoine Kallab <antoine@kallab.com> Cc: freebsd-questions@freebsd.org Subject: Re: Question about XDM Message-ID: <20140413174502.2f8187c7.freebsd@edvax.de> In-Reply-To: <CAL2Oafx5tQ-raQgNfa-ycJVF-%2BtCKR5LO36KoEkUUViFGjxyMA@mail.gmail.com> References: <CAL2Oafx5tQ-raQgNfa-ycJVF-%2BtCKR5LO36KoEkUUViFGjxyMA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Apr 2014 07:46:13 -0400, Antoine Kallab wrote: > I am trying to set up XDM. I want it to drop me in to a minimal TWM session > after I log in. Right now, it just flashes the screen and puts me back at > the login window. This usually indicates a missing ~/.xsession in the user's home directory (as we can assume that X is already running correctly). > From what I read in the handbook, there are a few configuration files in > /usr/local/lib/X11/xdm that I need to change to get it to sing and dance in > the way I want it to. There are several files to adjust the look and feel as well as the login and logout actions that xdm should take. Those are on the "global" level and independent from individual user settings. Those can be things the user cannot do on his own, due to permissions, for example change device ownership or access permissions to devices, files or directories. > If I remember correctly, it was Xsession that controlled what happened > after a user logs in. The file is ~/.xsession. It has the same format as ~/.xinitrc (which you can find examples for in The FreeBSD Handbook). As I'm using xdm myself, allow me to show you the mechanism I'm employing for being able to use both xdm as well as the classical "startx": My .xsession simply sources .xinitrc and makes sure that C-shell settings get honored (because the csh still is my preferred _dialog_ shell): % cat ~/.xsession #!/bin/csh source ~/.cshrc exec ~/.xinitrc % cat ~/.xinitrc #!/bin/sh [ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc # # ... more "desktop-y" stuff here ... # xsetroot -solid rgb:3b/4c/7a xset b 100 1000 15 & xset r rate 250 30 & xset s off & xset -dpms & exec wmaker The last line specifies the desktop environment starter or the window manager you want to use. Your X session lasts as long as _this_ program is running. In my case, that would be WindowMaker. Note that the sheband line #!/bin/sh isn't needed in .xinitrc, but it doesn't make things worse. :-) Make sure both files get "chmod +x". If you don't want to use "xinitrc" and always want to use xdm, you can write the content I've shown for .xinitrc into .xsession altogether. > Right now it is just an if/then loop that looks like it runs > /usr/local/bin/xsm. Is that whole thing necessary? Can't I just tell it to > run TWM? See example above, just have "exec twm" instead. For twm customization, see this great page: http://www.custompc.plus.com/twm/twmrc.htm Also refer to The FreeBSD Handbook: https://www.freebsd.org/doc/handbook/x-xdm.html You'll find everything I've mentioned (and more) there. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140413174502.2f8187c7.freebsd>