理解lightdm.conf
来源:互联网 发布:杭州淘宝商学院地址 编辑:程序博客网 时间:2024/06/06 21:40
Before you do anything to your lightdm.conf file, you should make a backup, simply run:
sudo cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.old
Once you’ve made a backup, the simplest and safest way to modify lightdm.conf is to use lightdm-set-defaults. lightdm-set-defaults was written so that lightdm.conf could be modified via script, but you can also use it to easily make changes. I’ve made several changes to this tool to add new features that I needed, and best of all, I even wrote a manpage for it, which should show up in raring at some point. If you’re not using raring, then just run /usr/lib/lightdm/lightdm-set-defaults with no arguments and you’ll get a clear picture on what it can do.
Usage:lightdm-set-defaults [OPTION...] - set lightdm default valuesHelp Options:-h, --help Show help optionsApplication Options:-d, --debug Enable debugging-k, --keep-old Only update if no default already set-r, --remove Remove default value if it's the current one-s, --session Set default session-g, --greeter Set default greeter-a, --autologin Set autologin user-i, --hide-users Set greeter-hide-users to true or false-m, --show-manual-login Set show-manual-login to true or false-R, --show-remote-login Set show-remote-login to true or false-l, --allow-guest Set allow-guest to true or false
You can also edit the file manually, but in either case, manual edit or set-defaults, you’ll need to use sudo. And now that you know how to modify the file, let’s cover what the most frequently asked about items are.
Disabling Guest Login
Some people really get annoyed by guest login, so if you want to disable it, simply use:
sudo /usr/lib/lightdm/lightdm-set-defaults --allow-guest false
Or, you can manually add the following line in the [SeatDefaults] section:
allow-guest=false
The default for this option is true, so if unset, the guest account will be enabled. Note: See how great the command option for lightdm-set-defaults was named? Whoever added that was a genius.
Hiding the User List
If you don’t want a user list to be displayed by the greeter, you can enable this option. This should also be used with the enabling manual login (below) or logging in may be a challenge (actually I’ve never tried one without the other, I’m not sure what will happen).
sudo /usr/lib/lightdm/lightdm-set-defaults --hide-users true
Or, you can manually add the following line in the [SeatDefaults] section:
greeter-hide-users=true
The default for this option is false, so if unset, you will get a user list in the greeter.
Show Manual Login Box
If you previously hid your user list and would like a box where you can manually type in a user name then this option is for you.
sudo /usr/lib/lightdm/lightdm-set-defaults --show-manual-login true
Or, you can manually add the following line in the [SeatDefaults] section:
greeter-show-manual-login=true
The default for this option is false, so if unset, you won’t get a manual login box.
Autologin
You can enable autologin by specifying the autologin user.
sudo /usr/lib/lightdm/lightdm-set-defaults --autologin username
Or, you can manually add the following line in the [SeatDefaults] section:
autologin-user=username
There are other autologin related options which you may want to set, but none of these can be set using lightdm-set-defaults:
To change how long the greeter will delay before starting autologin. If not set, the delay is 0, so if you want this to be 0, you don’t need to change it. Note: the default for all unset integers in the [SeatDefaults] section is 0.
autologin-user-timeout=delay
To enable autologin of the guest account:
autologin-guest=true
Run a Command When X Starts, When The Greeter Starts, When the User Session Starts
When lightdm starts X you can run a command or script, like xset perhaps.
display-setup-script=[script|command]
You can do something similar when the greeter starts:
greeter-setup-script=[script|command]
or when the user session starts:
session-setup-script=[script|command]
Change the Default Session
If you want a different session for the default, you can modify this option. I think that the greeter will default to give you the last session you chose, so this option will only change the default session.Note: The session switcher will only show up if you have more than one VALID session; a valid session is one that points to a valid executable. By default in 12.10 you will have a session file for gnome-shell, but gnome-shell won’t be installed, so the session is invalid, leaving you with a single valid session (Ubuntu), and hence no session selector!
/usr/lib/lightdm/lightdm-set-defaults --session [session name]
Or, you can manually add the following line in the [SeatDefaults] section:
user-session=true
The list of user sessions is in /usr/share/xsessions, although even that location is configurable (see Advanced Options).
You can change the default greeter in the same manner, using –greeter for lightdm-set-defaults or greeter-session for the config file. The list of installed greeters is in /usr/share/xgreeters.
Advanced Options and All Other Options
There is no manpage for lighdm.conf, but there is an example that lists all the options and a bit about what they do, just look in /usr/share/doc/lightdm/lightdm.conf.gz. If you use vim, you can just edit the file and it will be automagically ungzipped for you, users of other editors are on their own.
原文:http://www.mattfischer.com/blog/?p=343
- 理解lightdm.conf
- ubuntu修改etc/lightdm/lightdm.conf配置文件的命令
- httpd-vhosts.conf配置文件理解
- nginx.conf 翻译 简单理解
- httpd-vhosts.conf配置文件理解
- resolv.conf 三参数理解
- lightdm 开启root启动
- gdm LightDM和kdm
- LightDM配置说明
- LightDM 轻量级桌面显示管理器
- 【Ubuntu 16】显示管理器lightdm
- .conf
- ubuntu 11.10 lightdm 循环在登陆界面
- Ubuntu 12.04 更改 lightdm 登陆界面背景图
- ubuntu12.04.4切换GDM和LightDM
- Ubuntu下轻松切换GDM, LightDM , KDM
- [Ubuntu] LightDM 轻量级桌面显示管理器
- Ubuntu下轻松切换GDM, LightDM , KDM
- (九十一)距离传感器的使用
- Vim命令图解和XVim使用
- 通过SpringMVC+Annotation实现方法、按钮级别的细粒度权限控制
- 数据库事务(写得比较到位)
- 《Friends Season 04, Episode 01》---笔记
- 理解lightdm.conf
- TP中cache方法使用
- iOS注意事项
- V4包的经常错误
- Compare And Swap(CAS)实现无锁多生产者
- 精通Hibernate——Hibernate内置标识符详解
- Lintcode 主元素
- 【设计模式】代理模式实现连接池
- 设计模式之工厂模式