запустить скрипт после запуска xserver

509
Karl Morrison

У меня есть скрипт, который я хотел бы запустить после запуска xserver. Этот файл находится по адресу /home/karl/.scripts/startup/sensei-raw-startup.sh.

Как мне вызвать этот файл после запуска xserver?

0

1 ответ на вопрос

0
MariusMatutiae

Depends on what you want to do. All DEs (KDE, Gnome,...) provide ways to run programs at start, for instance in KDE you can put an executable into /home/YourName/.kde/Autostart. This is good enough for me, the details for you depend on your DE.

EDIT

As suggested by @grawity in the following comment, there is a method valid for all DEs, which is to place the executable in /home/YourName/.config/autostart.

Alternatively, you can place an executable file in /etc/X11/Xsession.d, and this will be executed for all users of your system; for most people this is just as good as the above solutions since they are the only users of their laptop/desktop/whatever... Just remember to give this file a name starting with 99z, so that it is executed last: the other files in the directory need to be executed before custom scripts.

Метод перекрестного DE - это [~ / .config / autostart /] (http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html). grawity 8 лет назад 0