LXDM: Difference between revisions
m (+link towards french wiki) |
(Remove references to the dropped git package https://lists.archlinux.org/archives/list/aur-requests@lists.archlinux.org/thread/AIKK2BWAH4SQACJNYZPQVBAYOQSYVFWG/#AIKK2BWAH4SQACJNYZPQVBAYOQSYVFWG) |
||
(19 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Display managers]] | [[Category:Display managers]] | ||
[[Category:LXDE]] | |||
[[de:Login-Manager#LXDM]] | |||
[[fr:LXDM]] | [[fr:LXDM]] | ||
[[ja:LXDM]] | [[ja:LXDM]] | ||
[[ru:LXDM]] | [[ru:LXDM]] | ||
Line 10: | Line 11: | ||
{{Related articles end}} | {{Related articles end}} | ||
LXDM is a lightweight [[display manager]] for the [[LXDE]] [[desktop environment]] | LXDM is a lightweight [[display manager]] for the [[LXDE]] [[desktop environment]]. | ||
LXDM does not support the [[XDMCP]] protocol. An alternative that does is [[LightDM]]. | LXDM does not support the [[XDMCP]] protocol. An alternative that does is [[LightDM]]. | ||
Line 16: | Line 17: | ||
== Installation == | == Installation == | ||
[[Install]] the {{Pkg|lxdm}} package, or {{Pkg|lxdm-gtk3}} for the | [[Install]] the {{Pkg|lxdm}} package, or {{Pkg|lxdm-gtk3}} for the [[GTK]]3 version. | ||
[[Enable]] the provided {{ic|lxdm.service}} | [[Enable]] the provided {{ic|lxdm.service}} unit to start LXDM at boot. | ||
== Configuration == | == Configuration == | ||
The configuration files for LXDM are all located in {{ic|/etc/lxdm/}}. The main configuration file is {{ic|lxdm.conf}} | The configuration files for LXDM are all located in {{ic|/etc/lxdm/}}. The main configuration file is {{ic|lxdm.conf}}. Its format is documented in its comments. Another file, {{ic|Xsession}}, is the systemwide x session configuration file and should generally not be edited. All other files in this directory are shell scripts, which are run when certain events happen in LXDM. | ||
These are: | These are: | ||
# {{ic|LoginReady}} is executed with root privileges when LXDM is ready to show the login window. | # {{ic|LoginReady}} is executed with root privileges when LXDM is ready to show the login window. | ||
# {{ic|PreLogin}} is run as root before logging a user in. | # {{ic|PreLogin}} is run as root before logging a user in. | ||
# {{ic|PostLogin}} is run as the logged-in user right after | # {{ic|PostLogin}} is run as the logged-in user right after they have logged in. | ||
# {{ic|PostLogout}} is run as the logged-in user right after | # {{ic|PostLogout}} is run as the logged-in user right after they have logged out. | ||
# {{ic|PreReboot}} is run as root before rebooting with LXDM. | # {{ic|PreReboot}} is run as root before rebooting with LXDM. | ||
# {{ic|PreShutdown}} is run as root before poweroff with LXDM. | # {{ic|PreShutdown}} is run as root before poweroff with LXDM. | ||
Line 34: | Line 35: | ||
=== Default session === | === Default session === | ||
The default session can be set globally, as well as set at an individual-user level. Individual user preferences take precedence over globally set preferences for the user in question. | |||
==== Globally ==== | ==== Globally ==== | ||
Line 55: | Line 56: | ||
==== Per user ==== | ==== Per user ==== | ||
To define an individual user's preferred session, simply edit | To define an individual user's preferred session, simply edit their respective {{ic|~/.dmrc}} to define the selection. | ||
Example: user1 wants Xfce4, user2 wants [[Cinnamon]], and user3 wants GNOME: | Example: user1 wants Xfce4, user2 wants [[Cinnamon]], and user3 wants GNOME: | ||
Line 70: | Line 71: | ||
[Desktop] | [Desktop] | ||
Session=gnome | Session=gnome | ||
The list of installed sessions can be displayed by using command: | |||
$ ls /usr/share/xsessions/ | |||
=== Autologin === | === Autologin === | ||
Line 79: | Line 83: | ||
=== Last used options === | === Last used options === | ||
Previously used LXDM options can be found in: | |||
{{hc|/var/lib/lxdm/lxdm.conf|2= | {{hc|/var/lib/lxdm/lxdm.conf|2= | ||
Line 87: | Line 91: | ||
last_langs=sv_SE.UTF-8 fa_IR.UTF-8 en_US.UTF-8}} | last_langs=sv_SE.UTF-8 fa_IR.UTF-8 en_US.UTF-8}} | ||
{{Note|This file is not removed | {{Note|This file is not automatically removed when uninstalling LXDM. It must be removed manually if you want to remove all traces of LXDM options.}} | ||
== Tips and tricks == | == Tips and tricks == | ||
Line 93: | Line 97: | ||
=== Adding face icons === | === Adding face icons === | ||
A 96x96 px image (jpg or png) can optionally be displayed on a per-user basis replacing the stock icon. | A 96x96 px image (jpg or png) can optionally be displayed on a per-user basis, replacing the stock icon. Copy or symlink the target image to {{ic|$HOME/.face}}. The {{Pkg|gnome-control-center}} package supplies some default icons suitable for the lxdm screen. Look under {{ic|/usr/share/pixmaps/faces}} after installing that package. | ||
{{Note| | {{Note| | ||
* Users need not keep {{Pkg|gnome-control-center}} installed to use | * Users need not keep {{Pkg|gnome-control-center}} installed to use face icons. Install it, copy the images elsewhere, and remove it. | ||
* The user | * The user home directory must have r-x permissions for others and the .face file must have r-- permissions for others. This may be undesirable from a security and access perspective if your system has other users: it means anyone else can browse your home directory. | ||
* A graphical tool {{ic|lxdm-config}} shipped with lxdm can be used to place a {{ic|.face}} file in the home directory, along with other configuration.}} | * A graphical tool {{ic|lxdm-config}} shipped with lxdm can be used to place a {{ic|.face}} file in the home directory, along with other configuration.}} | ||
=== Simultaneous users and switching users === | === Simultaneous users and switching users === | ||
LXDM allows multiple users to be logged into different | LXDM allows multiple users to be logged into different TTYs simultaneously. The following command is used to allow another user to log in without logging out the current user: | ||
$ lxdm -c USER_SWITCH | $ lxdm -c USER_SWITCH | ||
{{Note|When the new user logs in, | {{Note|When the new user logs in, their session is now on the NEXT TTY from tty7. For example, user1 logs in and issues the USER_SWITCH command. Now user2 logs in. User2 will be on tty7 while user1 will be on tty1.}} | ||
=== Themes === | === Themes === | ||
Line 112: | Line 116: | ||
The LXDM themes are located in {{ic|/usr/share/lxdm/themes}}. | The LXDM themes are located in {{ic|/usr/share/lxdm/themes}}. | ||
There is only one theme provided with LXDM | There is only one theme provided with LXDM: Industrial. To display the background file {{ic|wave.svg}} which is part of this theme, install {{Pkg|librsvg}}. | ||
{{AUR|lxdm-themes}} provides 6 extra themes | {{AUR|lxdm-themes}} provides 6 extra themes: Archlinux, ArchlinuxFull, ArchlinuxTop, Arch-Dark, Arch-Stripes, and IndustrialArch. | ||
Choice of theme is configurable in {{ic|/etc/lxdm/lxdm.conf}}: | |||
## the theme of greeter | ## the theme of greeter | ||
theme=theme_name | theme=theme_name | ||
You can also configure LXDM to use a GTK theme (stored in {{ic|/usr/share/themes}}) | You can also configure LXDM to use a GTK theme (stored in {{ic|/usr/share/themes}}) in {{ic|/etc/lxdm/lxdm.conf}}: | ||
## GTK theme | ## GTK theme | ||
Line 128: | Line 132: | ||
=== Advanced Session Configuration === | === Advanced Session Configuration === | ||
After a user logs on, LXDM sources ''all'' of the following files, in order: | After a user logs on, LXDM sources ''all'' of the following files, in the below order: | ||
# {{ic|/etc/profile}} | # {{ic|/etc/profile}} | ||
Line 143: | Line 147: | ||
source ~/.xinitrc | source ~/.xinitrc | ||
LXDM also makes use of .[[Xresources]], .[[Xkbmap]], and .[[Xmodmap]]. See {{ic|/etc/lxdm/Xsession}} for details on how LXDM uses system-wide and per-user configuration files to configure the session.[https:// | LXDM also makes use of .[[Xresources]], .[[Xkbmap]], and .[[Xmodmap]]. See {{ic|/etc/lxdm/Xsession}} for details on how LXDM uses system-wide and per-user configuration files to configure the session.[https://gitlab.archlinux.org/archlinux/packaging/packages/lxdm/-/blob/main/Xsession] | ||
== Troubleshooting == | == Troubleshooting == | ||
Line 149: | Line 153: | ||
=== White flash === | === White flash === | ||
When using the default LXDM {{ic|1=theme=Industrial}} and a dark background image (e.g. {{ic|1=bg=/usr/share/backgrounds/img.png}}) there may be a short bright flash before LXDM starts. This is caused by the {{ic|bg_color:}} property of the selected [[GTK | When using the default LXDM {{ic|1=theme=Industrial}} and a dark background image (e.g. {{ic|1=bg=/usr/share/backgrounds/img.png}}) there may be a short bright flash before LXDM starts. This is caused by the {{ic|bg_color:}} property of the selected [[GTK]] theme. To avoid this change {{ic|1=gtk_theme=Adwaita}} to {{ic|1=gtk_theme=Adwaita-dark}} or to another dark theme. | ||
=== Logout Issue === | |||
If you had trouble logging out when using lxdm (e.g. stuck, display freeze, etc..) try uncomment the {{ic|1=reset=1}} option in {{ic|1=/etc/lxdm/lxdm.conf}} to refresh xserver on every logout. |
Latest revision as of 15:45, 16 April 2024
LXDM is a lightweight display manager for the LXDE desktop environment.
LXDM does not support the XDMCP protocol. An alternative that does is LightDM.
Installation
Install the lxdm package, or lxdm-gtk3 for the GTK3 version.
Enable the provided lxdm.service
unit to start LXDM at boot.
Configuration
The configuration files for LXDM are all located in /etc/lxdm/
. The main configuration file is lxdm.conf
. Its format is documented in its comments. Another file, Xsession
, is the systemwide x session configuration file and should generally not be edited. All other files in this directory are shell scripts, which are run when certain events happen in LXDM.
These are:
LoginReady
is executed with root privileges when LXDM is ready to show the login window.PreLogin
is run as root before logging a user in.PostLogin
is run as the logged-in user right after they have logged in.PostLogout
is run as the logged-in user right after they have logged out.PreReboot
is run as root before rebooting with LXDM.PreShutdown
is run as root before poweroff with LXDM.
Default session
The default session can be set globally, as well as set at an individual-user level. Individual user preferences take precedence over globally set preferences for the user in question.
Globally
Edit /etc/lxdm/lxdm.conf
and change the session line to whatever session or DE is desired:
session=/usr/bin/startlxde
Example using Xfce:
session=/usr/bin/startxfce4
Example using Openbox:
session=/usr/bin/openbox-session
Example using GNOME:
session=/usr/bin/gnome-session
This is useful for themes that have no visible session selection box, and if experiencing trouble using autologin.
Per user
To define an individual user's preferred session, simply edit their respective ~/.dmrc
to define the selection.
Example: user1 wants Xfce4, user2 wants Cinnamon, and user3 wants GNOME:
For user1:
[Desktop] Session=xfce
For user2:
[Desktop] Session=cinnamon
For user3:
[Desktop] Session=gnome
The list of installed sessions can be displayed by using command:
$ ls /usr/share/xsessions/
Autologin
To log in to one account automatically on startup, without providing a password, find the line in /etc/lxdm/lxdm.conf
that looks like this:
#autologin=dgod
Uncomment it, substituting the target user instead of dgod.
Last used options
Previously used LXDM options can be found in:
/var/lib/lxdm/lxdm.conf
[base] last_session=/usr/share/xsessions/LXDE.desktop last_lang=sv_SE.UTF-8 last_langs=sv_SE.UTF-8 fa_IR.UTF-8 en_US.UTF-8
Tips and tricks
Adding face icons
A 96x96 px image (jpg or png) can optionally be displayed on a per-user basis, replacing the stock icon. Copy or symlink the target image to $HOME/.face
. The gnome-control-center package supplies some default icons suitable for the lxdm screen. Look under /usr/share/pixmaps/faces
after installing that package.
- Users need not keep gnome-control-center installed to use face icons. Install it, copy the images elsewhere, and remove it.
- The user home directory must have r-x permissions for others and the .face file must have r-- permissions for others. This may be undesirable from a security and access perspective if your system has other users: it means anyone else can browse your home directory.
- A graphical tool
lxdm-config
shipped with lxdm can be used to place a.face
file in the home directory, along with other configuration.
Simultaneous users and switching users
LXDM allows multiple users to be logged into different TTYs simultaneously. The following command is used to allow another user to log in without logging out the current user:
$ lxdm -c USER_SWITCH
Themes
The LXDM themes are located in /usr/share/lxdm/themes
.
There is only one theme provided with LXDM: Industrial. To display the background file wave.svg
which is part of this theme, install librsvg.
lxdm-themesAUR provides 6 extra themes: Archlinux, ArchlinuxFull, ArchlinuxTop, Arch-Dark, Arch-Stripes, and IndustrialArch.
Choice of theme is configurable in /etc/lxdm/lxdm.conf
:
## the theme of greeter theme=theme_name
You can also configure LXDM to use a GTK theme (stored in /usr/share/themes
) in /etc/lxdm/lxdm.conf
:
## GTK theme gtk_theme=gtk_theme_name
Advanced Session Configuration
After a user logs on, LXDM sources all of the following files, in the below order:
/etc/profile
~/.profile
/etc/xprofile
~/.xprofile
These files can be used to set session environment variables and to start services which must set certain environment variables in order for clients in the session to be able to use the service, like ssh-agent. See Xprofile for details.
Note that LXDM does not source ~/.xinitrc
, so those migrating from a DM that does use this file, like SLiM, will have to move their settings elsewhere — probably ~/.xprofile
. Also note LXDM does not source ~/.bash_profile
.
If you still want to use your ~/.xinitrc
file, you can add a line to the /etc/lxdm/PostLogin
event file:
source ~/.xinitrc
LXDM also makes use of .Xresources, .Xkbmap, and .Xmodmap. See /etc/lxdm/Xsession
for details on how LXDM uses system-wide and per-user configuration files to configure the session.[1]
Troubleshooting
White flash
When using the default LXDM theme=Industrial
and a dark background image (e.g. bg=/usr/share/backgrounds/img.png
) there may be a short bright flash before LXDM starts. This is caused by the bg_color:
property of the selected GTK theme. To avoid this change gtk_theme=Adwaita
to gtk_theme=Adwaita-dark
or to another dark theme.
Logout Issue
If you had trouble logging out when using lxdm (e.g. stuck, display freeze, etc..) try uncomment the reset=1
option in /etc/lxdm/lxdm.conf
to refresh xserver on every logout.