You are not logged in.

#1 2014-06-28 13:54:58

whitebrice
Member
Registered: 2013-12-20
Posts: 33

[SOLVED] Trouble with running systemd user service on login

I'm trying to get emacs to run as a systemd/user service so that it will start up faster, as suggested in the wiki article, but I'm having some problems.

I can't get the service to run as soon as I log in. I can run the service with

systemctl --user start emacs

and it will run for the rest of my session, but if I try to run

systemctl --user enable emacs

I get the following error:

The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).

I ran

systemctl --user is-enabled emacs

and that returned

static

but I'm not sure what that means. Any help would be greatly appreciated.

Last edited by whitebrice (2014-06-28 17:20:13)

Offline

#2 2014-06-28 14:53:33

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Trouble with running systemd user service on login

Are you sure there isn't a typo in your unit file? The example you linked to in the wiki does have an [Install] section.

Post your ~/.config/systemd/user/emacs.service file here so we can take a look.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2014-06-28 17:19:39

whitebrice
Member
Registered: 2013-12-20
Posts: 33

Re: [SOLVED] Trouble with running systemd user service on login

That was it, thanks. I read the "WantedBy" in the [Install] section as "WarnedBy". I swear I looked at it a dozen times, but I didn't see it until after your suggestion.

Thanks!

Offline

Board footer

Powered by FluxBB