I'm no expert in SLiM, but I don't think it is possible to configure SLiM to boot by default the X session you selected last time using F1. At least I can't see an option for that listed in the
SLiM Manual.
However, the global default X session is defined in the file /etc/env.d/90xsession. for example:
- Code: Select all
XSESSION="Xfce4"
so you could try using a Bash script to write the current value of the environment variable XSESSION to the file /etc/env.d/90xsession when you shut down. The script would have to be put in the directory /etc/local.d/, have the suffix ".stop" and be executable. For example, you (as root user) could create the file /etc/local.d/xsession.stop containing:
- Code: Select all
#!/bin/sh
echo 'XSESSION="'$XSESSION'"' > /etc/env.d/90xsession
and make it executable:
- Code: Select all
# chmod +x /etc/local.d/xsession.stop
Check if the initscript
local is in the default runlevel:
- Code: Select all
# rc-update | grep local
It should be in SL if I recall correctly but, if it isn't, you can add it:
- Code: Select all
# rc-update add local default
I cannot test this myself, as I only have one DE (Xfce) installed on the machine on which I am using SLiM. So I'm not sure if it would work. You'll have to try it and see.