运行 shell XServer 启动后的脚本?

Run shell script after XServer is started?

如何在启动 XServer 和 lightdm 时 运行 shell 编写脚本。我尝试在 /etc 目录中使用 init.d 和 rc.local,但我的脚本正在调用一个 gui 应用程序,因此我需要在 XServer 启动后 运行 它的原因。

我正在使用 Debian Jessie。

据此link .xinitrc 在您的主目录将被读取并执行,否则使用默认值/etc/X11/xinit/xinitrc。因此,您应该能够创建此文件并启动 shell 脚本。