From owner-freebsd-questions@FreeBSD.ORG Sun Apr 13 15:46:17 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 975DCF99 for ; Sun, 13 Apr 2014 15:46:17 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A9F71A40 for ; Sun, 13 Apr 2014 15:46:17 +0000 (UTC) Received: from r56.edvax.de (port-92-195-84-247.dynamic.qsc.de [92.195.84.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 608113F5EB; Sun, 13 Apr 2014 17:46:08 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s3DFj2aK002129; Sun, 13 Apr 2014 17:45:02 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 13 Apr 2014 17:45:02 +0200 From: Polytropon To: Antoine Kallab Subject: Re: Question about XDM Message-Id: <20140413174502.2f8187c7.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 15:46:17 -0000 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, ...