You are not logged in.

#1 2020-06-17 20:07:12

mjd119
Member
Registered: 2020-05-07
Posts: 119

[SOLVED] Imwheel service doesn't start on login have to start manually

I created a user systemd service file according to the Arch wiki, but the service doesn't start on login. I have to call systemctl --user start imwheel to start the service manually. It works after that.
The ~/.config/systemd/user/imwheel.service

[Unit]
Description=IMWheel
Wants=display-manager.service
After=display-manager.service
[Service]
Type=simple
Environment=XAUTHORITY=%h/.Xauthority
ExecStart=/usr/bin/imwheel -d -b 45 
ExecStop=/usr/bin/pkill imwheel
RemainAfterExit=no
Restart=on-failure
[Install]
WantedBy=graphical.target

When I check the status when I boot and login, getting the status just says that the service is dead, no error messages. Not sure what I'm missing. I enabled --now like the wiki says.

Last edited by mjd119 (2020-06-17 20:50:33)

Offline

#2 2020-06-17 20:18:31

loqs
Member
Registered: 2014-03-06
Posts: 19,062

Re: [SOLVED] Imwheel service doesn't start on login have to start manually

Systemd user instance does not use graphical.target see systemd.special.

Offline

#3 2020-06-17 20:26:05

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Imwheel service doesn't start on login have to start manually

loqs wrote:

Systemd user instance does not use graphical.target see systemd.special.

The example on the wiki has that as the target. Should it be default.target or something else?

Offline

#4 2020-06-17 20:27:49

loqs
Member
Registered: 2014-03-06
Posts: 19,062

Re: [SOLVED] Imwheel service doesn't start on login have to start manually

Yes default.target.

Offline

#5 2020-06-17 20:28:46

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Imwheel service doesn't start on login have to start manually

loqs wrote:

Yes default.target.

Ok. I don't think I am knowledgeable enough to edit the wiki. Should it be changed? I'm referring to https://wiki.archlinux.org/index.php/IM … on_startup

Offline

#6 2020-06-17 20:31:54

loqs
Member
Registered: 2014-03-06
Posts: 19,062

Re: [SOLVED] Imwheel service doesn't start on login have to start manually

Does the service start correctly with the change to default.target after disabling and enabling it then logging out and in?
Edit:
Disabling and enabling the service is needed to move the link from graphical.target.wants to default.target.wants.

Last edited by loqs (2020-06-17 20:37:14)

Offline

#7 2020-06-17 20:50:08

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Imwheel service doesn't start on login have to start manually

loqs wrote:

Does the service start correctly with the change to default.target after disabling and enabling it then logging out and in?
Edit:
Disabling and enabling the service is needed to move the link from graphical.target.wants to default.target.wants.

It starts on login now (I logged in as root to check it wasn't already running). I don't need to start it manually. Marking this as solved.

Offline

Board footer

Powered by FluxBB