SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-01-17 15:42:52

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Slim configuration for #! November 2011

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)

Offline

Be excellent to each other!

#2 2012-01-17 17:23:13

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: Slim configuration for #! November 2011

Very nice work xaos52 - looking forward to more on this.


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#3 2012-01-18 02:18:20

rippin
#! Member
Registered: 2010-01-26
Posts: 61

Re: Slim configuration for #! November 2011

I am so please you found that Slim fix ... beat my forehead bloody over it last night!


rippin

Offline

#4 2012-01-18 13:52:38

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: Slim configuration for #! November 2011

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 smile

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)

Offline

#5 2012-01-25 09:04:14

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: Slim configuration for #! November 2011

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)

Offline

#6 2012-01-25 11:48:26

dkeg
#! Die Hard
From: Mid-Atlantic Grill
Registered: 2011-12-05
Posts: 716

Re: Slim configuration for #! November 2011

wow, great stuff xaos52.  Thank you!  Haven't tried it yet, but next thing to experiment with will be this. Subscribing....


grill it | the rocky path may just be the best path

Offline

#7 2012-01-25 12:21:34

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 3,007

Re: Slim configuration for #! November 2011

@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. smile


Point & Squirt

Offline

#8 2012-01-25 12:44:25

vicshrike
#! by Default
From: /grill
Registered: 2009-02-13
Posts: 2,967

Re: Slim configuration for #! November 2011

Great how to xaos52, looking forward to the next episode.


#!, all else is but a shadow

Offline

#9 2012-01-27 03:10:49

2ManyDogs
dv#!
From: elsewhere
Registered: 2011-11-22
Posts: 1,346

Re: Slim configuration for #! November 2011

Awesome how-to, thanks.

xaos52 wrote:

Next episode: Logout, shutdown or reboot from the login window.

Eagerly awaiting this next episode smile


Be eggsalad to each other.

Offline

#10 2012-01-28 14:12:38

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: Slim configuration for #! November 2011

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)

Offline

#11 2012-01-28 14:51:37

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: Slim configuration for #! November 2011

^ awesome. seen enough people asking for this stuff to be aware or its usefulness. great work on the how-to overall.

Offline

#12 2012-01-28 15:13:31

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: Slim configuration for #! November 2011

Thank you, rhowaldt smile

Offline

#13 2012-01-28 15:44:24

2ManyDogs
dv#!
From: elsewhere
Registered: 2011-11-22
Posts: 1,346

Re: Slim configuration for #! November 2011

Thank you xaos, this will be very handy.


Be eggsalad to each other.

Offline

#14 2013-07-03 18:57:06

sharkytowers
New Member
Registered: 2013-06-29
Posts: 4

Re: Slim configuration for #! November 2011

I'm curious...  rebooting from the login screen...  how?

Cheers.

Loving Crunchbang so far!

Offline

#15 2013-07-03 20:20:58

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 12,155

Re: Slim configuration for #! November 2011

^ 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#!!


I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#16 2013-07-03 23:28:43

rippin
#! Member
Registered: 2010-01-26
Posts: 61

Re: Slim configuration for #! November 2011

sharkytowers wrote:

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

#17 2013-09-09 06:18:33

GekkoP
#! Junkie
From: Vicenza (Italy)
Registered: 2013-06-17
Posts: 296
Website

Re: Slim configuration for #! November 2011

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

#18 2013-09-09 09:20:08

GekkoP
#! Junkie
From: Vicenza (Italy)
Registered: 2013-06-17
Posts: 296
Website

Re: Slim configuration for #! November 2011

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

#19 2013-09-09 12:23:03

rippin
#! Member
Registered: 2010-01-26
Posts: 61

Re: Slim configuration for #! November 2011

GekkoP wrote:

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

#20 2013-09-09 13:21:14

GekkoP
#! Junkie
From: Vicenza (Italy)
Registered: 2013-06-17
Posts: 296
Website

Re: Slim configuration for #! November 2011

I haven't got lightdm.

Offline

#21 2013-11-13 02:09:53

mike green
Member
From: United Kingdom
Registered: 2013-11-12
Posts: 41

Re: Slim configuration for #! November 2011

Thank you kindly xaos52, this was very helpful when I wanted to change my default window manager. Great stuff  wink

Offline

#22 2013-11-13 14:47:20

AlanD
#! CrunchBanger
Registered: 2011-05-12
Posts: 139

Re: Slim configuration for #! November 2011

Thanks for this. I have learned a few new tricks about SLiM.


Nerds that build or deploy tongue

Offline

#23 2013-11-13 16:47:40

AlanD
#! CrunchBanger
Registered: 2011-05-12
Posts: 139

Re: Slim configuration for #! November 2011

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 tongue

Offline

#24 2014-04-08 05:18:00

mike green
Member
From: United Kingdom
Registered: 2013-11-12
Posts: 41

Re: Slim configuration for #! November 2011

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

Help fund CrunchBang, donate to the project!

#25 2014-04-09 13:59:53

daggoth
Member
From: New Zealand
Registered: 2012-01-18
Posts: 27

Re: Slim configuration for #! November 2011

mike green wrote:

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

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo