LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 03-08-2014, 04:06 PM   #1
André0991
LQ Newbie
 
Registered: Jul 2008
Location: São Paulo
Distribution: Slackware
Posts: 15

Rep: Reputation: 0
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.
 
Old 03-08-2014, 05:15 PM   #2
slacksam
Member
 
Registered: Oct 2012
Location: Germany
Distribution: Slackware 14.1
Posts: 65

Rep: Reputation: 4
Quote:
Originally Posted by André0991 View Post
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

Last edited by slacksam; 03-08-2014 at 05:27 PM.
 
Old 03-12-2014, 06:16 PM   #3
André0991
LQ Newbie
 
Registered: Jul 2008
Location: São Paulo
Distribution: Slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by slacksam View Post
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)

Last edited by André0991; 03-12-2014 at 06:21 PM.
 
Old 03-15-2014, 11:29 AM   #4
André0991
LQ Newbie
 
Registered: Jul 2008
Location: São Paulo
Distribution: Slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Up.
 
Old 03-15-2014, 01:21 PM   #5
slacksam
Member
 
Registered: Oct 2012
Location: Germany
Distribution: Slackware 14.1
Posts: 65

Rep: Reputation: 4
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.
 
  


Reply

Tags
slim


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to install SLiM JWJones Slackware 16 04-11-2013 12:18 PM
Configuring SLiM Johnny Who Linux - Software 1 09-14-2012 11:00 PM
problem with slim mfduqued Linux - Desktop 1 04-11-2009 09:59 AM
slim login problem - anyone succeed in configuring slim? rkrishna Slackware 20 02-18-2008 07:50 AM
Slim down Kaffeine Ashrack Linux - Software 5 04-09-2007 04:48 PM


All times are GMT -5. The time now is 11:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration