LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Choosing WM with slim (http://www.linuxquestions.org/questions/slackware-14/choosing-wm-with-slim-4175497525/)

André0991 03-08-2014 04:06 PM

Choosing WM with slim
 
Hello.

I'm using slim here, but I don't know how I should edit some files in order to choose the wm using f1.

I've read in some pages that I have to edit ~/.xsession, but Slackware's ~/.xsession looks quite different from other distros.

Here's my ~/.xsession:

Code:

#!/bin/sh
#  xinitrc.xfce - modified to work around xfce4session bug
#                https://bugzilla.xfce.org/show_bug.cgi?id=8841


########################################################################
##  Merge in defaults and keymaps                                    ##
########################################################################

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

########################################################################
##  Start xfce Desktop Environment                                    ##
########################################################################

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session dbus-launch --exit-with-session /usr/bin/startxfce4
else
  exec dbus-launch --exit-with-session /usr/bin/startxfce4
fi

According to https://wiki.archlinux.org/index.php...e_environments, for example, I should replace the content of the file with
Code:

DEFAULTSESSION=openbox-session

case "$1" in
    xfce) exec xfce4-session ;;
    kde) exec startkde ;;
    cinnamon) exec gnome-session-cinnamon ;;
    razor-qt) exec razor-session ;;
    lxde) exec lxsession ;;
    mate) exec mate-session ;;
    *) exec $DEFAULTSESSION ;;
esac

However, it didn't work. I could press f1 and change the option, but it starts xfce anyway.


Thanks.

slacksam 03-08-2014 05:15 PM

Quote:

Originally Posted by André0991 (Post 5131234)
Code:

DEFAULTSESSION=openbox-session

case "$1" in
    xfce) exec xfce4-session ;;
    kde) exec startkde ;;
    cinnamon) exec gnome-session-cinnamon ;;
    razor-qt) exec razor-session ;;
    lxde) exec lxsession ;;
    mate) exec mate-session ;;
    *) exec $DEFAULTSESSION ;;
esac


Put that into ~/.xinitrc instead of ~/.xsession.

If that doesn't work, edit the /etc/slim.conf and change the sessions line to
Code:

sessions      xfce,kde,cinnamon,razor-qt,lxde,mate

André0991 03-12-2014 06:16 PM

Quote:

Originally Posted by slacksam (Post 5131262)
Put that into ~/.xinitrc instead of ~/.xsession.

If that doesn't work, edit the /etc/slim.conf and change the sessions line to
Code:

sessions      xfce,kde,cinnamon,razor-qt,lxde,mate


Hello. Thanks. I could start KDE, for example, however, I was unable to use the networkmanager and to shutdown the system directly by the KDE buttons. The same occurs with xfce if I start it with the lines that are now commented (see below). I guess that this has something to do with dbus.

Here's the final part of my xinitrc:

Code:

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session dbus-launch --exit-with-session /usr/bin/startxfce4
else
  exec dbus-launch --exit-with-session /usr/bin/startxfce4
fi

#DEFAULTSESSION=xfce4-session
#
#case "$1" in
#    xfce) exec xfce4-session ;;
#    kde) exec startkde ;;
#    cinnamon) exec gnome-session-cinnamon ;;
#    razor-qt) exec razor-session ;;
#    lxde) exec lxsession ;;
#    mate) exec mate-session ;;
#    *) exec $DEFAULTSESSION ;;
#esac

May anyone explain what's the difference between starting the session with "ck-launch-session" and with "dbus-launch"? (in the if/else)

André0991 03-15-2014 11:29 AM

Up.

slacksam 03-15-2014 01:21 PM

AFAIK in Slackware with "ck-launch-session" you don't need to call "dbus-launch --exit-with-session", since it's called automatically.
So in your .xinitrc
Code:

exec ck-launch-session xfce4-session
should be enough to launch the Xfce session.

IMHO the "dbus-launch" command you only need on a system where ConsoleKit is not installed/running and no other session management system (i.e. systemd) is running.


All times are GMT -5. The time now is 03:51 PM.