Skip to content
Florian Lindner edited this page Jan 12, 2017 · 2 revisions

User Processes

This page is work in progress.

Starting at boot

Processes can be started at boot using cron. Edit your crontab file with crontab -e and put a line like this in it

@reboot  /path/to/executable

A more clean method would be to use a systemd user unit. To acomplish that, put a file like

[Unit]
Description=Emacs: the extensible, self-documenting text editor

[Service]
Type=forking
ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(save-buffer-kill-emacs)"
SuccessExitStatus=15
Restart=always

[Install]
WantedBy=default.target

in ~/.config/systemd/user/emacs.service and execute systemctl --user enable emacs.service. For the first time, you need to ask root to enable linger, so that your session is started at boot.

A good introduction is the Arch wiki (https://wiki.archlinux.org/index.php/Systemd, https://wiki.archlinux.org/index.php/Systemd/User)

Clone this wiki locally