[Change] Ubuntu LightDM lightweight desktop display manager

LightDM (Light Display Manager) is a brand new lightweight Linux desktop display manager, while the traditional Ubuntu uses GNOME desktop standard GDM.

  LightDM is a cross-desktop display manager, which aims to become the standard display manager of X Server of X org.

  LightDM is a new project started in 2010 and is designed to be lightweight, compact and fast. Compared with GDM-GTK, KDM-Qt, LightDM has nothing to do with the interface, it only supports the local graphical interface for the best compatibility.

  LightDM running in Ubuntu is responsible for starting X servers, user sessions and welcome interface. Ubuntu's default welcome screen is Unity Greeter.

Configuration

  LightDM configuration files include:


1. /usr/share/lightdm/lightdm.conf.d/*.conf
2. /etc/lightdm/lightdm.conf.d/*.conf
3. /etc/lightdm/lightdm.conf

  The configuration parameters used by the system are stored in  /usr/share/lightdm/lightdm.conf.d/*.conf and cannot be edited by the user. The system administrator can reload the system configuration parameters in /etc/lightdm/lightdm.conf.d/*.conf  and  /etc/lightdm/lightdm.conf  . The system will read the aforementioned three files in sequence and finally get the effective configuration information of LightDM.

  For example, if you want to reload the system default session (the default session is saved in  /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf ), you can create a new file  /etc/lightdm/lightdm.conf. d/50-myconfig.conf , the content is as follows:


1. [SeatDefaults]
2. user-session=mysession

All possible configuration examples are stored   in the  /usr/share/doc/lightdm/lightdm.conf.gz file.

Forbid guest login

  LightDM allows you to log in as a temporary guest by default, and this function is disabled:


1. [SeatDefaults]
2. allow-guest=false

Hide user list

  Unity Greeter (and other similar welcome screens as well) displays a user list by default. If you want to disable this feature, you can use the following configuration, which can also be used to start manual login.


1. [SeatDefaults]
2. greeter-hide-users=true

Allow manual login

  Unity Greeter does not allow you to enter a username to log in by default. You can enable this feature with the following configuration.


1. [SeatDefaults]
2. greeter-show-manual-login=true

Set up automatic login

  Set  autologin-user to automatically log in to an account when the system starts. Set  autologin-user-timeout to  restrict users from being able to log in automatically if they do not log in automatically within the set seconds.


1. [SeatDefaults]
2. autologin-user=username
3. autologin-user-timeout=delay

  Set up automatic login guest account.


1. autologin-guest=true

Modify the default session

  The default session settings are saved in  /usr/share/lightdm/lightdm.conf.d/  session package.


1. [SeatDefaults]
2. user-session=name

  Where name represents  <name>.desktop in /usr/share/xsessions/*.desktop .

Modify the welcome screen

  The welcome interface is provided by the  welcome interface package in /usr/share/lightdm/lightdm.conf.d/ . You can override this setting.


1. [SeatDefaults]
2. greeter-session=name

  Where name represents   the <name>.desktop file in /usr/share/xgreeters/*.desktop .

Add system hook

  如果你想在 X servers 和用户会话启动/关停时自动做些事情,那么可以按照以下方式设置自动执行命令:


1. [SeatDefaults]
2. display-setup-script=command
3. display-stopped-script=command (Not in Ubuntu 12.04 LTS)
4. greeter-setup-script=command
5. session-setup-script=command
6. session-cleanup-script=command
7. session-wrapper=command
8. greeter-wrapper=command (Not in Ubuntu 12.04 LTS)

  display-setup-script 在 X server 启动后,欢迎界面启动之前运行。该命令由 root 运行,如果命令执行出现错误,X server 会停止运行。

  display-stopped-script 在 X server 退出后运行。该命令由 root 运行。

  greeter-setup-script 在欢迎界面启动前运行。该命令由 root 运行。如果命令执行出现错误,欢迎界面将无法启动并导致 LightDM 退出。

  session-setup-script 用户会话启动之前运行,如果失败,用户会话将不启动。

  session-cleanup-script 在欢迎界面或用户会话退出之后运行。由 root 运行。

  session-wrapper 该命令用于运行会话。该命令使用用户身份运行。默认值为 lightdm-session。

  greeter-wrapper 该命令用于运行欢迎界面。等同于 session-wrapper。

修改墙纸

  LightDM 不配置欢迎界面外观。

  Unity Greeter 默认显示当前选中的用户的背景图案。设置默认背景,并停止背景切换,编辑 /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override。


1. [com.canonical.unity-greeter]
2. draw-user-backgrounds=false
3. background='/foo/wallpaper.png'

  然后运行 sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ 使配置生效。

  如果使用的是 LightDM GTK+ 欢迎界面,编辑 /etc/lightdm/lightdm-gtk-greeter.conf


1. background=/usr/share/lubuntu/wallpapers/lubuntu-default-wallpaper.png

LightDM 相关操作

  切换命令行:alt-ctrl-F1。

  LightDM 日志:/var/log/lightdm。

  关停 LightDM:$ sudo stop lightdm。

  启动 LightDM:$ sudo start lightdm。

  设置 LightDM 为默认显示管理器:$ sudo dpkg-recofigure lightdm。

1. LightDM - Ubuntu wiki

Guess you like

Origin blog.csdn.net/miracle_eicont/article/details/52268863