Paramétrer le WM par défaut dans Slim

Coucou. :006

J’ai viré KDM pour installer Slim à la place.

J’ai modifié le fichier de configuration original slim.conf de la sorte :

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
default_xserver     /usr/bin/X11/X
xserver_arguments   -nolisten tcp

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue.net; exec /bin/login"
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/X11/xauth

# Xauth file for server
authfile           /var/run/slim.auth


# Activate numlock when slim starts. Valid values: on|off
# numlock             on

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login /etc/X11/Xsession %session

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd	some command
# sessionstop_cmd	some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon	yes

# 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            awesome

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      scrot /root/slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to %host

# Session message. Prepended to the session name when pressing F1
# session_msg         Session: 

# shutdown / reboot messages
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
default_user        *********

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
focus_password      yes

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login          no


# current theme, use comma separated list to specify a set to 
# randomly choose from
current_theme       debian-moreblue-orbit

# Lock file
lockfile            /var/run/slim.lock

# Log file
logfile             /var/log/slim.log

Le but étant que Awesome soit le WM présélectionné. Or, malgré ce fichier, c’est KDE qui est choisi par défaut.

Si vous avez une suggestion…

Salut,

Tu n’as pas omis le dpkg-reconfigure ?

C’est ton fichier /etc/X11/Xsession qui va être lû pour déterminer quel est le gestionnaire de fenêtres à lancer.
C’est un script qui regarde d’abord la présence de différents fichiers dans ton home, dont ~/.Xsession.
Il faut donc que tu te fasses un fichier ~/.Xsession contenant au moins :

Détails : fluxbox.sourceforge.net/docbook/ … setup.html

C’est ce qui remplace le %session dans la command login_cmd. Ça ajoute donc awesome comme paramètre à Xsession. Mais Xsession ignore les paramètres que tu lui donne. Tu pourrais cependant mettre :

Mais si tu n’utilises qu’un seul WM, ça n’a pas d’intérêt…

Sinon, moi j’ai ce slim.conf, avec ce .xinitrc (je n’utilise pas le même fichier, mais ça revient un peu au même) :

[code]$ cat /etc/slim.conf

Path, X server and arguments (if needed)

Note: -xauth $authfile is automatically appended

default_path /bin:/usr/bin:/usr/local/bin:/usr/bin/X11
default_xserver /usr/bin/X11/X
xserver_arguments -nolisten tcp

Commands for halt, login, etc.

halt_cmd /sbin/shutdown -h now
reboot_cmd /sbin/shutdown -r now
console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T “Console login” -e /bin/sh -c “/bin/cat /etc/issue.net; exec /bin/login”
#suspend_cmd /usr/sbin/suspend

Full path to the xauth binary

xauth_path /usr/bin/X11/xauth

Xauth file for server

authfile /var/run/slim.auth

Activate numlock when slim starts. Valid values: on|off

numlock on

Hide the mouse cursor (note: does not work with some WMs).

Valid values: true|false

hidecursor false

This command is executed after a succesful login.

you can place the %session and %theme variables

to handle launching of specific commands in .xinitrc

depending of chosen session and slim theme

NOTE: if your system does not have bash you need

to adjust the command according to your preferred shell,

i.e. for freebsd use:

login_cmd exec /bin/sh - ~/.xinitrc %session
#login_cmd exec /bin/bash -login /etc/X11/Xsession %session

Commands executed when starting and exiting a session.

They can be used for registering a X11 session with

sessreg. You can use the %user variable

sessionstart_cmd some command

sessionstop_cmd some command

Start in daemon mode. Valid values: yes | no

Note that this can be overriden by the command line

options “-d” and “-nodaemon”

daemon yes

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 dwm,evilwm,wmii,pekwm,xfce

Executed when pressing F11 (requires imagemagick)

screenshot_cmd scrot /root/slim.png

welcome message. Available variables: %host, %domain

welcome_msg Welcome to %host

Session message. Prepended to the session name when pressing F1

session_msg Session:

shutdown / reboot messages

shutdown_msg The system is halting…
reboot_msg The system is rebooting…

default user, leave blank or remove this line

for avoid pre-loading the username.

#default_user simone

Focus the password field on start when default_user is set

Set to “yes” to enable this feature

#focus_password no

Automatically login the default user (without entering

the password. Set to “yes” to enable this feature

#auto_login no

current theme, use comma separated list to specify a set to

randomly choose from

current_theme debian-moreblue-orbit

Lock file

lockfile /var/run/slim.lock

Log file

logfile /var/log/slim.log[/code]

$ cat .xinitrc export LC_ALL=fr_FR.UTF-8 export LANG=fr_FR.UTF-8 if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then eval `dbus-launch --sh-syntax --exit-with-session` fi export OOO_FORCE_DESKTOP=gtk mpd & mpdscribble & /home/xavier/Documents/Scripts/mails.sh & /home/xavier/Documents/Scripts/wallpaper.sh & case $1 in dwm ) /home/xavier/Documents/Scripts/dmenu/dstatus.sh & exec dwm ;; xfce ) exec startxfce4 ;; pekwm ) exec pekwm ;; evilwm ) exec evilwm -bg "3C3C3C" -fg "554444" -bw 2 -mask1 mod4 -mask2 mod4 -term dmenu_run ;; wmii-hg ) exec /usr/local/bin/wmii ;; * ) /home/xavier/Documents/Scripts/dmenu/dstatus.sh & exec dwm ;; esac

Merci pour ces réponses.

Donc :

  1. J’ai tenté sans plus de succès le dpkg-reconfigure

  2. Je constate que je n’ai pas de fichier xinitrc. Je l’ai donc créé :

[code]#!/bin/sh

~/.xinitrc

Executed by startx (run your window manager from here)

exec awesome[/code]

Là encore sans succès.

  1. Je précise cependant que je peux lancer awesome depuis la page slim, mais il me faut impérativement appuyer sur F1 auparavant.

  2. Les raccourcis halt et reboot ne semblent pas fonctionner. Comment se sert on de ces commandes ?

  1. Si tu fais un .xinitrc, il faut mettre ~/.xinitrc dans login_cmd, comme l’a fait thuban.

  2. Me suis trompé, Xsession prend en compte le paramètre que tu lui donne. F1 permet de switcher entre les différents WM inscrits dans sessions. Tu peux faire de même pour ton .xinitrc, là encore comme l’a fait thuban (case $1 in …).

  3. il faut taper halt ou reboot comme login, avec le mot de passe root.

Allez, je te file le slim.conf qu’il faut, avec le .xinitrc qu’il faut (à rendre éxécutable : chmod +x ~/.xinitrc))

slim.conf :

[code]# Path, X server and arguments (if needed)

Note: -xauth $authfile is automatically appended

default_path /bin:/usr/bin:/usr/local/bin:/usr/bin/X11
default_xserver /usr/bin/X11/X
xserver_arguments -nolisten tcp

Commands for halt, login, etc.

halt_cmd /sbin/shutdown -h now
reboot_cmd /sbin/shutdown -r now
console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T “Console login” -e /bin/sh -c “/bin/cat /etc/issue.net; exec /bin/login”
#suspend_cmd /usr/sbin/suspend

Full path to the xauth binary

xauth_path /usr/bin/X11/xauth

Xauth file for server

authfile /var/run/slim.auth

Activate numlock when slim starts. Valid values: on|off

numlock on

Hide the mouse cursor (note: does not work with some WMs).

Valid values: true|false

hidecursor false

This command is executed after a succesful login.

you can place the %session and %theme variables

to handle launching of specific commands in .xinitrc

depending of chosen session and slim theme

NOTE: if your system does not have bash you need

to adjust the command according to your preferred shell,

i.e. for freebsd use:

login_cmd exec /bin/sh - ~/.xinitrc %session
#login_cmd exec /bin/bash -login /etc/X11/Xsession %session

Commands executed when starting and exiting a session.

They can be used for registering a X11 session with

sessreg. You can use the %user variable

sessionstart_cmd some command

sessionstop_cmd some command

Start in daemon mode. Valid values: yes | no

Note that this can be overriden by the command line

options “-d” and “-nodaemon”

daemon yes

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

ajoute/enlève ici les wm que tu utilise

sessions awesome,dwm,evilwm,wmii,pekwm,xfce

Executed when pressing F11 (requires imagemagick)

screenshot_cmd scrot /root/slim.png

welcome message. Available variables: %host, %domain

welcome_msg Welcome to %host

Session message. Prepended to the session name when pressing F1

session_msg Session:

shutdown / reboot messages

shutdown_msg The system is halting…
reboot_msg The system is rebooting…

default user, leave blank or remove this line

for avoid pre-loading the username.

#default_user simone

Focus the password field on start when default_user is set

Set to “yes” to enable this feature

#focus_password no

Automatically login the default user (without entering

the password. Set to “yes” to enable this feature

#auto_login no

current theme, use comma separated list to specify a set to

randomly choose from

current_theme debian-moreblue-orbit

Lock file

lockfile /var/run/slim.lock

Log file

logfile /var/log/slim.log[/code]
Le .xinitrc pour toi :

[code]cat .xinitrc

Tu peux mettre ici tout ce que tu veux lancer au démarrage, je t’en laisse un minimum par commodité

#Pour ces commandes pas besoin, mais en général, il faut que ce soit suivi d"un &
export LC_ALL=fr_FR.UTF-8
export LANG=fr_FR.UTF-8
export OOO_FORCE_DESKTOP=gtk
case $1 in
dwm )
/home/xavier/Documents/Scripts/dmenu/dstatus.sh &
exec /usr/local/bin/dwm
;;
xfce )
exec startxfce4
;;
pekwm )
exec pekwm
;;
evilwm )
exec evilwm -bg “3C3C3C” -fg “554444” -bw 2 -mask1 mod4 -mask2 mod4 -term dmenu_run
;;
awesome )
exec awesome
;;
awesome )
exec awesome
;;
esac
[/code]

Grand merci.

J’ai mis en stand-by ce fil pour un moment ayant d’autres problèmes à régler.

Sinon je trouve quand même l’utilisation de slim peu aisée à la base du moins. Devoir à chaque fois tapper le mot de passe root pour un reboot ou pour lancer un terminal… :12

Sinon je galère à couper le serveur d’affichage X pour le paramètrer. On peut me donner une méthode pour le suspendre ?

[quote=“Cver1”]
Sinon je galère à couper le serveur d’affichage X pour le paramètrer. On peut me donner une méthode pour le suspendre ?[/quote]
# dpkg-reconfigure keyboard-configuration, la derniere question concerne le ctrl+alt+backspace pour tuer X. Repondre oui evidement.

Sinon si slim te fatigue ce truc peut peut-etre t’interesser :
https://forum.debian-fr.org/viewtopic.php?p=143062#p143062

Le Ctrl + Alt + Backspace est inopérant justement… :017

Je poursuis mes investigations…

[quote=“Cver1”]Le Ctrl + Alt + Backspace est inopérant justement… :017

Je poursuis mes investigations…[/quote]
Meme apres le # dpkg-reconfigure keyboard-configuration? Que donne la commande cat /etc/default/keyboard?

Oui pardon, je n’avais pas redémarré la machine. La Ctrl + Alt + Backspace fonctionne maintenant. :075

“Ctrl + Alt + Backspace” tue la session X mais pas GDM/KDM/Slim
Pour ma part j’utilise de préférences

ou

Sans forcement prendre soin de se déconnecter de Gnome/KDE/…