Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2001 23:10:50 -0500
From:      scott <smnoldelinux@mediaone.net>
To:        Ian Moore <imoore@picknowl.com.au>
Cc:        "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: .xsession errors with multiple window managers
Message-ID:  <3AC1644A.6070B910@mediaone.net>
References:  <3AC0853D.D2D64DCC@picknowl.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AC1644A.6070B910>