On 2019-05-19 15:58 +1200, Aidan Gauland wrote: > I have a bunch of systemd user services for headless daemons that I want > to run in both console and graphical logins, which all work fine, but I > have one that I only want to start for graphical logins, and that works > when I start it manually, but it is not being started when I log in, > even though I have the WantedBy field set to graphical.target. I am > using lightdm and i3.
How do you start lightdm? It should only be started automatically in graphical.target. > The other services' WantedBy field is set to > default.target. What is the correct way to specify that a service > should be started only for X logins? The wantedBy field is the correct place to specify that, but you also have to make sure that your X login is actually reached via graphical.target. Cheers, Sven