2

I am lost, I don't know why this does not work for the user on reboot:

(not working means: if I start it manually using systemctl --user start nostc it works perfectly, no errors. In the logs there are no errors either). I just see that after a reboot, Stopped lines occur right before the reboot.

[Unit]
Description=nostc.service
After=network-online.target

[Service]
Type=simple
Restart=always
ExecStart=/home/pascal/.pyenv/versions/3.7.2/envs/feb2018/bin/nostalgia_chrome run_server
WorkingDirectory=/home/pascal/egoroot/nostalgia-dev/nostalgia_chrome
Environment="PYTHONUNBUFFERED=on"

[Install]
WantedBy=multi-user.target```

It's really weird because:

systemctl --user is-enabled nostc shows enabled

On boot it shows:

● nostc.service
     Loaded: loaded (/home/pascal/.config/systemd/user/nostc.service; enabled; vendor pr>
     Active: inactive (dead)
lines 1-3/3 (END)

But as root it does work (systemctl is-enabled nostalgia_chrome and runs):

[Unit]
Description=nostalgia_chrome service
After=network-online.target

[Service]
User=pascal
Group=users
Type=simple
Restart=always
ExecStart=/usr/bin/nostalgia_chrome run-server
Environment="PYTHONUNBUFFERED=on"

[Install]
WantedBy=multi-user.target

Could multi-user be setup wrongly on arch+i3, or what could possibly be the issue?

3

2 Answers 2

1

This is not valid for a user:

[Install]
WantedBy=multi-user.target

It should be most likely:

[Install]
WantedBy=default.target
0
[Install]
WantedBy=multi-user.target

There is no multi-user.target for per-user service management in systemd.

Read man systemd.special.

1
  • 1
    Do you know how to make it wanted by "something" for a user (such that it will always be started)? Jan 10, 2020 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.