View Single Post
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#13
no idea the 'correct' way to do this, but patchmanager is probably not a good way to do it, if you even can make it start a long-lived script.

i personally do all my auto-start crap like this:

1) make service file to run /usr/local/bin/autostart
Code:
nemo@sx:~$ cat /usr/lib/systemd/user/auto-start.service
[Unit]
Description=Auto-start stuff after lipstick
Requires=lipstick.service
After=lipstick.service

[Service]
Type=oneshot
ExecStart=/usr/local/bin/autostart
RemainAfterExit=yes

[Install]
WantedBy=user-session.target
2) make that service user-session.target wants:
Code:
nemo@sx:~$ ls -al /home/nemo/.config/systemd/user/auto-start.service /home/nemo/.config/systemd/user/user-session.target.wants/auto-start.service 
lrwxrwxrwx 1 nemo nemo 40 Jan 19 02:55 /home/nemo/.config/systemd/user/auto-start.service -> /usr/lib/systemd/user/auto-start.service
lrwxrwxrwx 1 nemo nemo 40 Jan 19 02:55 /home/nemo/.config/systemd/user/user-session.target.wants/auto-start.service -> /usr/lib/systemd/user/auto-start.service
3) then i stick all sorts of stuff in /usr/local/bin/autostart:
Code:
nemo@sx:~$ cat /usr/local/bin/autostart 
#!/bin/sh
PATH=/home/nemo/bin:$PATH

/home/nemo/bin/screen-daemon backup-daemon --start
/home/nemo/bin/screen-daemon email-daemon --start
/home/nemo/bin/screen-daemon button-monitor --start
sudo cpu-enable fast
aliendalvik-post-start
__________________
~ teleshoes ~
 

The Following 4 Users Say Thank You to wolke For This Useful Post: