mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-03 23:40:14 +08:00
PRF:20180521 Starting user software in X.md
@geekpi
This commit is contained in:
parent
e15bbd50f5
commit
77a46b1b72
@ -1,4 +1,4 @@
|
||||
在 X 中启动用户软件
|
||||
如何在 X 中启动用户软件
|
||||
======
|
||||
|
||||
目前有很多方法可以在开启用户会话时启动软件。
|
||||
@ -7,56 +7,48 @@
|
||||
|
||||
### x11-common
|
||||
|
||||
`man xsession`
|
||||
```
|
||||
man xsession
|
||||
```
|
||||
|
||||
* 由显示管理器启动,如 `/usr/share/lightdm/lightdm.conf.d/01_debian.conf` 或 `/etc/gdm3/Xsession`。
|
||||
* Debian 特定。
|
||||
* 在 `/etc/X11/Xsession.d/` 中运行脚本。
|
||||
* `/etc/X11/Xsession.d/40x11-common_xsessionrc` 引用 `~/.xsessionrc` ,它只比设置环境变量能做的多一点,因为它在 X 会话启动时运行。
|
||||
* `/etc/X11/Xsession.d/40x11-common_xsessionrc` 引用 `~/.xsessionrc` ,它能比设置环境变量能做的多一点,因为它在 X 会话启动时运行。
|
||||
* 最后,它启动会话管理器(`gnome-session`、`xfce4-session` 等等)。
|
||||
|
||||
|
||||
|
||||
### systemd --user
|
||||
|
||||
* <https://wiki.archlinux.org/index.php/Systemd/User>
|
||||
* 由 `pam_systemd` 启动,所以它可能在环境变量中没有 DISPLAY 变量设置。
|
||||
* 由 `pam_systemd` 启动,所以在环境变量中可能没有设置 `DISPLAY` 变量。
|
||||
* 管理单元:
|
||||
* `/usr/lib/systemd/user/` 由已安装的软件包提供的单元。
|
||||
* `~/.local/share/systemd/user/` 由安装在家目录的软件包提供的单元。
|
||||
* `/etc/systemd/user/` 由系统管理员提供的系统范围的用户的单元。
|
||||
* `~/.config/systemd/user/` ,用户自己放置的单元。
|
||||
* 设置 X 会话并使用 DISPLAY 变量时,启动 systemd 用户单元的技巧是从 `.desktop` 自启动文件调用 `systemctl start`。
|
||||
* 当设置 X 会话和 `DISPLAY` 变量时,启动 systemd 用户单元的技巧是从 `.desktop` 自启动文件调用 `systemctl start`。
|
||||
|
||||
|
||||
|
||||
### dbus activation
|
||||
### dbus 激活
|
||||
|
||||
* <https://dbus.freedesktop.org/doc/system-activation.txt>
|
||||
* 进行 dbus 请求的用户进程可以触发启动服务器程序。
|
||||
* 对于系统调试,有没有一种方法可以监控哪些服务正在启动 dbus?
|
||||
|
||||
|
||||
* 对于系统调试,有没有一种方法可以监控哪些服务正在启动 dbus ?
|
||||
|
||||
### X 会话管理器
|
||||
|
||||
* <https://en.wikipedia.org/wiki/X_session_manager>
|
||||
* 由 `x11-common` 的 `Xsession.d` 运行。
|
||||
* 运行 freedesktop autostart .desktop 文件。
|
||||
* 运行 freedesktop 自动启动的 `.desktop` 文件。
|
||||
* 运行桌面环境特定的软件。
|
||||
|
||||
|
||||
|
||||
### xdg autostart
|
||||
### xdg 自动启动
|
||||
|
||||
* <https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html>
|
||||
* 由会话管理器运行
|
||||
* 由会话管理器运行。
|
||||
* 如果存在 `/etc/xdg/autostart/foo.desktop` 和 `~/.config/autostart/foo.desktop` ,那么只会使用 `~/.config/autostart/foo.desktop`,因为 `~/.config/autostart/` 比 `/etc/xdg/autostart/` 更重要。
|
||||
* 是否有顺序或者并行?
|
||||
* 是顺序的还是并行?
|
||||
|
||||
|
||||
|
||||
### 其他启动笔记
|
||||
### 其他启动注意事项
|
||||
|
||||
#### ~/.Xauthority
|
||||
|
||||
@ -73,7 +65,7 @@ via: http://www.enricozini.org/blog/2018/debian/starting-user-software/
|
||||
作者:[Enrico Zini][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user