Skip to main content
9 events
when toggle format what by license comment
Sep 2, 2021 at 0:58 comment added Porcupine Could you please also look at bash - Systemd user service fails after reboot but works manually properly - Unix & Linux Stack Exchange
Aug 29, 2021 at 7:04 comment added Stewart When enabling a unit, systemd creates a symbolic link in *.wants/ to your unit. When starting graphical-session.target, systemd check graphical-session.target.wants/ to set the Wants= relationship. Then raises any units with a link in that directory.
Aug 28, 2021 at 12:48 comment added Porcupine I enabled using graphical-seesion.target. I see that this got created /home/nikhil/.config/systemd/user/graphical-session.target.wants/Browser.service. Also, I saw that the folder /usr/lib/systemd/user/graphical-session.target.wants exists. So, graphical-session.target.wants can exists in 2 locations, right?
Aug 28, 2021 at 12:37 vote accept Porcupine
Aug 28, 2021 at 7:08 comment added Stewart Some people may suggest graphical.target on the system bus, but the problem with this is you need to manually set the $DISPLAY and $XAUTHORITY environment variables in your service, you need to set User= and it will try to start when reaching the display manager login screen instead of when the desktop environment is started.
Aug 28, 2021 at 7:04 comment added Stewart For a GUI app, the user-bus is certainly the way to go. graphical-session.target or xdg-desktop-autostart.target are the design for starting GUI applications, but in reality these are not implemented by all desktop environments yet. Try these first for firefox. If these are not implemented on your machine, then default.target is your answer (though this may also run if you login via ssh)
Aug 27, 2021 at 18:28 comment added Porcupine Thanks I will accept after testing it. Also, if we are trying to start an application that requires GUI such as Firefox from user service, can we use default.target?
Aug 27, 2021 at 13:55 history edited Stewart CC BY-SA 4.0
added 4 characters in body
Aug 27, 2021 at 13:31 history answered Stewart CC BY-SA 4.0