From owner-freebsd-questions Tue Mar 27 20:11: 6 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp.atl.mediaone.net (atlasmtp.atl.mediaone.net [65.32.2.34]) by hub.freebsd.org (Postfix) with ESMTP id 5551637B718 for ; Tue, 27 Mar 2001 20:11:01 -0800 (PST) (envelope-from smnoldelinux@mediaone.net) Received: from mediaone.net (rr-163-52-118.atl.mediaone.net [24.163.52.118]) by smtp.atl.mediaone.net (8.8.7/8.8.7) with ESMTP id XAA29440; Tue, 27 Mar 2001 23:10:50 -0500 (EST) Message-ID: <3AC1644A.6070B910@mediaone.net> Date: Tue, 27 Mar 2001 23:10:50 -0500 From: scott X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-RC i386) X-Accept-Language: en MIME-Version: 1.0 To: Ian Moore Cc: "freebsd-questions@FreeBSD.ORG" Subject: Re: .xsession errors with multiple window managers References: <3AC0853D.D2D64DCC@picknowl.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Do you need a .xserverrc file? $(HOME}/.xserverrc: #!/bin/sh Xdepth="-bpp 16" #sorta depricated if [ -x /usr/X11R6/bin/Xwrapper ] ; then exec /usr/X11R6/bin/Xwrapper -auth $HOME/.Xauthority ${Xdepth} else exec X -auth ${HOME}/.Xauthority ${Xdepth} fi - Scott Ian Moore wrote: > > Hi, > I'm running fbsd 4.1-Release & I'm having trouble trying to get > Xsession/.xsession configured to allow me to choose a window manager > from the kdm login screen (I belive I'd have exactly the same problem if > I was using xdm, though I haven't tried). > My Xsession file looks like: > #!/bin/sh -xv > for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" > "/tmp/xses-$USER" > do > if ( cp /dev/null "$errfile" 2> /dev/null ) > then > chmod 600 "$errfile" > exec > "$errfile" 2>&1 > break > fi > done > case $# in > 1) > case $1 in > failsafe) > exec xterm -geometry 80x24-0-0 > ;; > esac > esac > startup=$HOME/.xsession > resources=$HOME/.Xresources > if [ -f "$startup" ]; then > exec "$startup $1" > else > if [ -f "$resources" ]; then > xrdb -load "$resources" > fi > exec xsm > fi > > This should pick up the $1 parameter passed to it by kdm and then pass > that on to .xsession which looks like (for root): > #!/bin/sh -xv > #set default wm to kde > defaultwm=kde > #set the window manager to $1 if it was supplied > windowmgr=${1:-$defaultwm} > #start the respective window managers > case ${windowmgr} in > kde|kwm|kdestart) > WINDOWMANAGER=startkde > ;; > fvwm|fvwm2) > WINDOWMANAGER=fvwm2 > ;; > *) WINDOWMANAGER=windowmgr # default for unknown wm's > > esac > exec $WINDOWMANAGER > > but when I log in as root, it just goes back to the login screen. > (Xsession & > .xsession are both executable). The contents of .xsession-errors is: > + break > > case $# in > 1) > case $1 in > failsafe) > exec xterm -geometry 80x24-0-0 > ;; > esac > esac > > startup=$HOME/.xsession > + startup=/root/.xsession > resources=$HOME/.Xresources > + resources=/root/.Xresources > > if [ -f "$startup" ]; then > exec "$startup $1" > else > if [ -f "$resources" ]; then > xrdb -load "$resources" > fi > exec xsm > fi > + [ -f /root/.xsession ] > + exec /root/.xsession fvwm > exec: /root/.xsession fvwm: not found > > The last line seems to imply that exec does not understand > /root/.session fvwm correctly. > If I edit Xsession and remove $1 from the line exec "$startup $1" and > change the last line of .xsession to exec startkde or exec fvwm, it > loads kde or fvwm correctly. > Also, if I run sh .xsession kde from an xterm, it runs .xsession & loads > kde correctly. > So why does it not work if .xsession kde is exec'ed from Xsession ? > > I'm very confused by this - any help would be greatly appreciated. > Cheers, > Ian Moore > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message