Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running SLiM 1.3.4-2 on a Raspberry Pi with Raspbian. I have Xfce4 and LXDE installed. When SLiM shows up it says Session: default and when I run that LXDE starts. I want Xfce4 as default.

I've tried adding

#!/bin/sh
/usr/bin/startxfce4

To .xinitrc and doing chmod +x ~/.xinitrc (which I had to create, because there was no .xinitrc), but that does not help. I've tried adding only DEFAULT_SESSION=startxfce4 to .xinitrc. I have also tried removing default from the sessions variable in /etc/slim.conf but LXDE stays default when I just log in via SLiM without pressing F1 to pick startxfce4.

share|improve this question

Put a statement similar to this one in your ~/.xinitrc file.

# Adapted from: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample

case $1 in
kde)
    exec startkde
    ;;
xfce4)
    exec startxfce4
    ;;
wmaker)
    exec wmaker
    ;;
blackbox)
    exec blackbox
    ;;
icewm|*)
    icewmbg &
    icewmtray &
    exec icewm
    ;;
esac

Note: In the latest version (1.3.5), SLiM does not preset any default session, so using a DEFAULT_SESSION variable will not work the way it used to. Instead put your default session as the last case and |*) to the statement (see above).

More Info

share|improve this answer
    
Yes, but as noted I'm running 1.3.4-2. It was the latest version for me to get when doing an sudo apt-get install --only-upgrade slim. I did this: gist.github.com/anonymous/6971683 And it did not work. (Sorry for external code. I couldn't quite figure out how to get a code block in this reply. Indented with 4 spaces, but it does nothing.) – eightfold Oct 14 '13 at 6:41

Depending of the version of your SLiM - from ArchWiki

Note: SLiM no longer supports a 'default' session where multiple sessions have been enabled. This is most noticable where attempting to log out and back in again to the same session.

You can't get a default session currently, you either put in your .xinitrc file:

exec startxfce4

or select the session by pushing the F1 key each time you attempt to log in.

It is not needed to make the huge case statement above:

DEFAULTSESSION=startxfce4
if [ "$1" = "" ] 
then exec $DEFAULTSESSION
else exec  $1
fi

would do the job.

share|improve this answer
    
Slim Options, as you can see, there's no default session option in all slim available configurations (edit your /etc/slim.conf file), i suspect - the order of the session list in slim depends of the method that slim grabs it from the /usr/share/xsession (or similar on your os) directory – 0x2A-kLatOo Dec 20 '15 at 18:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.