You are not logged in.
Episode 1: The login loop after fresh install
Example: http://crunchbanglinux.org/forums/post/177333/#p177333
Experienced users will create $HOME/.xsession or $HOME/..xinitrc, but this is not meant for linux gurus.
Solution:
enter "console" in the username field
this will start a login xterm
enter your user name and password
then run the command:
sudo update-alternatives --config x-session-manager
You will be presented with a menu with 3 options
select option 2: openbox-session
close the xterm window (enter exit ot Ctrl+D)
enter your username and password
you will be logged in
explanation:
without an $HOME/.xsession or $HOME/.xinitrc, slim starts the xserver with this command:
++ exec /usr/bin/ssh-agent /usr/bin/ck-launch-session /usr/bin/dbus-launch \
--exit-with-session x-session-manager
and x-session-manager defaults to lxsession via alternatives
lxsession terminates immediately without (apparently) doing anything (such is the nature of lxsession )
the session is terminated (--exit-with-session option)
you are dropped to console for a moment, then
slim shows login panel again to start a new session
and we are back at the beginning of the loop.
This is not a slim problem: it is a configuration problem.
Watch out for the next episode: I prefer WM such or such over openbox - how do I do that with slim ?
Coming shortly ...
Last edited by xaos52 (2012-01-17 15:46:25)
bootinfoscript - emacs primer - wireless problems- I ♥ #!
Offline
I am so please you found that Slim fix ... beat my forehead bloody over it last night!
rippin
Offline
Episode 2: testing window manager such-and-such
So, you want to test a new window-manager, and be able to return to your old window manager when you do not like it.
You have seen this post http://crunchbanglinux.org/forums/post/117831/#p117831 by bigbenaugust and you want to see for yourself what it all looks like...
Start with installing the window-manager
sudo apt-get install jwm
You have slim running as your login manager. We will add the possibility to see JWM at work:
We will be editing /etc/slim.conf as root:
sudo geany /etc/slim.conf
Find the line that starts with "sessions":
It probably looks like this:
# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions openbox-session
Just append the new window-manager to the end of that line, so it looks like this:
# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions openbox-session,jwm
Save your modifications.
Log out of your current session:
Win+x
Click on 'Logout'.
You are presented with a new login screen
Pressing F1 multiple times will cycle through your configured window managers.
When JWM is selected, enter your user name and password, and ... tadaaaa
So far I have done this with icewm, jwm and... scrotwm
Yes, scrotwm ! No longer the privilege of guru's, though I would recommend reading up on its configuration before embarking on that one.
In scrotwm, to start a program: press Alt+p and type the name of the program, e.g. terminator to start a terminal window.
To quit from scrotwm, use the key combo Alt + Shift + q
Hurry all over the scrotwm thread http://crunchbanglinux.org/forums/post/102580/#p102580 and join the fun
Next episode: I have made up my mind. I want window manager this-or-that as my default window-manager, so I can forget about pressing F1 every time I log in.
Coming to you shortly...
Last edited by xaos52 (2012-01-18 13:54:40)
bootinfoscript - emacs primer - wireless problems- I ♥ #!
Offline
Episode 3: Making scrotwm your default window manager
I do not know about you but I got really tired about having to press F1 every time I wanted to start X using scrotwm as my preferred window manager.
Well it is easily remedied using the following commands
sudo update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/scrotwm 50
sudo update-alternatives --config x-session-manager
The last command will give you a list of installed session/window managers.
The one you added should be the last in line.
Just enter the number corresponding to your preferred session/window manager
You can verify that it is now the default with
sudo update-alternatives --query x-session-manager
That is all there is to it.
Next time you start The X server using slim, no need to select scrotwm with F1. Just enter your user name and password, and you are dropped into the comforting arms of your preferred window manager[ess].
Of course you can use it for any window manager: just replace /usr/bin/scrotwm with the path to your preferred window-manager in above command.
PS: I know you can do this with creating a custom $HOME/.xsession or $HOME/.xinitrc, but I find this more elegant.
Next episode: Logout, shutdown or reboot from the login window.
Last edited by xaos52 (2012-01-25 09:05:42)
bootinfoscript - emacs primer - wireless problems- I ♥ #!
Offline
Offline
@xaos
I don't use SLiM, but will keep this thread in mind if/when I do feel the need to try it.
I like your writing style, btw.
Cheers.
Point & Squirt
Offline
Great how to xaos52, looking forward to the next episode.
Time to move on!#
Offline
Awesome how-to, thanks.
Next episode: Logout, shutdown or reboot from the login window.
Eagerly awaiting this next episode
Be eggsalad to each other.
Offline
Intermezzo: a duet brought to you by slim and Xfce.
Installing Xfce and configuring it to work under slim is quite easy.
By popular request - 2 votes ! - here is the how to:
□ Install the packages xfce4 and xfce4-goodies, if you have not done so already.
sudo apt-get install xfce4 xfce4-goodies
This will automatically add - in the postinst step - an alternative xfce4 session manager for x-session-manager.
□ All that is left to do is activate that session manager:
sudo update-alternatives --config x-session-manager
You will be presented a menu of possible session managers.
Select the number that corresponds with xfce4-session-manager,
Press enter
Restart your system (this is not really necessary, but perhaps for now it is the easiest way - watch out for the next episode in this tutorial for how to log out from your slim session)
Do not use F1 to select your session. You want the default session.
Just fill in user name and password and you will be dropped in Xfce.
That is all, folks, a one-step solution to make Xfce your default session manager.
□ If you want to be able to select the session, first update /etc/slim.conf - like explained in episode 2: http://crunchbanglinux.org/forums/post/180522/#p180522. Add
xfce4-session
to the list of session/window managers. The order in which you specify them is the order in which they will show when you cycle through them using function key F1.
# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions openbox-session,xfce4-session,jwm,scrotwm
Save the file, reboot and try it out by pressing F1 repeatedly before filling in your user name and password.
Look out for the next - final? - episode of this quest for slim wisdom.
Have fun with #!
Last edited by xaos52 (2012-01-28 14:16:48)
bootinfoscript - emacs primer - wireless problems- I ♥ #!
Offline
^ awesome. seen enough people asking for this stuff to be aware or its usefulness. great work on the how-to overall.
Offline
Thank you, rhowaldt
bootinfoscript - emacs primer - wireless problems- I ♥ #!
Offline
Thank you xaos, this will be very handy.
Be eggsalad to each other.
Offline
I'm curious... rebooting from the login screen... how?
Cheers.
Loving Crunchbang so far!
Offline
^ from the SLiM man page:
USAGE AND SPECIAL USERNAMES
When started, slim will show a login panel; enter the username and
password of the user you want to login as.
Special usernames:
console
open a xterm console
exit quit slim
halt shutdown the machine
reboot reboot the machine
suspend
power-suspend the machine
See the configuration file for customizing the above commands. The
'halt' and 'reboot' commands need the root password, this may change in
future releases.
Welcome to Club#!!
Offline
I'm curious... rebooting from the login screen... how?
To reboot: from login screen I just ctrl+alt+F1 to tty and ctrl+alt+del.
rippin
Offline
Sorry for bringing back and old post, but I got a question. I installed spectrwm. I can switch to it using the /etc/slim.conf file and pressing F1 on login, but I can't set this as my default WM using:
sudo update-alternatives --config x-session-manager
It says:
There is only one alternative in link group x-session-manager (providing /usr/bin/x-session-manager): /usr/bin/openbox-session
Same thing happens if I try with i3-wm.
Offline
I tried getting latest spectrwm from git. Installed dependecies and compiled, now I have it in /usr/local/bin/spectrwrm. However update-alternatives still doesn't show it.
So what I did is editing /etc/slim.conf and changing these lines:
login_cmd exec /bin/sh - ~/.xinitrc %session
#login_cmd exec /bin/bash -login /etc/X11/Xsession %session
My .initrc looks like this
#! /bin/sh
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
export PATH="$SHOME/bin:$PATH"
## Volume keys daemon
xfce4-volumed &
## Enable power management
xfce4-power-manager &
## Start i8kmon daemon (fan control)
i8kmon --daemon &
#thunar daemon
thunar --daemon &
#start urxvt daemon
urxvtd -q -f -o &
#restore wallpaper
nitrogen --restore &
## Detect and configure touchpad. See 'man synclient' for more info.
#if egrep -iq 'touchpad' /proc/bus/input/devices; then
# synclient VertEdgeScroll=1 &
# synclient TapButton1=1 &
#fi
synclient TapButton1=1 &
## Start xscreensaver
xscreensaver -no-splash &
## Set keyboard settings - 250 ms delay and 25 cps (characters per second) repeat rate.
## Adjust the values according to your preferances.
xset r rate 250 25 &
## Turn on/off system beep
xset b off &
## Run the conky
conky -q &
#start spectrwm
/usr/local/bin/spectrwm
I rebooted and now I get a "Failed to execute login command". Damn.
Last edited by GekkoP (2013-09-09 09:20:26)
Offline
Sorry for bringing back and old post, but I got a question. I installed spectrwm. I can switch to it using the /etc/slim.conf file and pressing F1 on login, but I can't set this as my default WM using:
sudo update-alternatives --config x-session-manager
<snipped>
This a poke at it, but have you tried writing an entry in ~/.dmrc for spectrwm? For my session it reads
[Desktop]
Session=lightdm-xsession
rippin
Offline
Offline
Thank you kindly xaos52, this was very helpful when I wanted to change my default window manager. Great stuff
Offline
Thanks for this. I have learned a few new tricks about SLiM.
Nerds that build or deploy
Offline
GekkoP, you will want to install debhelper and then run dh_installwm --priority=60 spectrwm to register it with update-alternatives. The do the usual sudo update-alternatives --config x-session-manager
caveat: I haven't tested it.
Some interesting info on the matter in section 11:10: http://www.debian.org/doc/manuals/debia … ng.en.html
Last edited by AlanD (2013-11-13 18:00:10)
Nerds that build or deploy
Offline
Hi folks, I have two window managers installed, openbox and i3. F1 used to work as expected to cycle through the window managers at login, but now it no longer does anything at all. Anyone any ideas why this might be?
Thanks,
Mike.
Offline
Hi folks, I have two window managers installed, openbox and i3. F1 used to work as expected to cycle through the window managers at login, but now it no longer does anything at all. Anyone any ideas why this might be?
This is more an observation than a solution. My distro is synced to "testing" rather than "stable" repos. And recently, a package upgrade for slim slightly changed the format of /etc/slim.conf. Such that before, your windows managers were listed in the conf file like this...
sessions startxfce4,openbox,fvwm
Whereas now, that line in the conf has changed to just point to a folder that contains the same info, like this...
# Set directory that contains the xsessions.
# slim reads xsesion from this directory, and be able to select.
sessiondir /usr/share/xsessions/
If this is your problem, then perhaps check that /usr/share/xsessions contains the files that slim expects to find there.
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat