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


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:

case $1 in
    exec startkde
    exec startxfce4
    exec wmaker
    exec blackbox
    icewmbg &
    icewmtray &
    exec icewm

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: 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:

if [ "$1" = "" ] 
else exec  $1

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


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.