You are not logged in.
Hi,
I have installed offlineimap and have configured it to grab my email. Now all I want is to run it as a user service. But for whatever reason, systemd does not recognize the unit file is there:
Failed to enable unit: File offlineimap@sezovr.service: No such file or directory
I've symlinked the unit file from /usr/lib/systemd/user like this:
$ ls -l
total 4.0K
lrwxrwxrwx 1 root root 42 Mar 3 11:53 'offlineimap@.service' -> '/usr/lib/systemd/user/offlineimap@.service'
drwxr-xr-x 2 root root 4.0K Mar 1 11:56 sockets.target.wants/
But I cannot get the service to start or enable because systemd seems to be unable to find it.
Does anybody know what I'm doing wrong? Thanks!
Last edited by sez11a (2017-03-03 21:21:50)
Offline
Don't manually symlink, use the systemctl --user <start|enable> $target ... does doing that give a different result?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Here's the result:
[root@enterprise:user]# systemctl --user start offlineimap@sezovr
Failed to connect to bus: Operation not permitted
Offline
Please edit your post and choose a title that actually reflects your issue: https://wiki.archlinux.org/index.php/Co … ow_to_post
You run --user services from ~/.config/systemd/user/
Offline
Don't run systemd services as root, run them as a regular user.
EDIT: Are you using root as your day to day user?
Last edited by atomicbeef (2017-03-03 21:37:07)
Offline
Don't run systemd services as root, run them as a regular user.
EDIT: Are you using root as your day to day user?
No; absolutely not. I was just trying to make sure it wasn't a permissions issue, since the error was "operation not permitted."
I'm trying to run this as a user service that runs at logon. This is a new install; on my old install, I could, as a user, simply issue:
systemctl start offlineimap@sezovr
and it would start/enable/whatever. I don't remember configuring anything to make this work before, so now I'm confused as to why it's not working.
Offline
General_troubleshooting#Session_permissions
Also what is the output of
$ printenv DBUS_SESSION_BUS_ADDRESS
Offline
Try the --user flag.
systemctl start offlineimap --user
Offline
I've symlinked the unit file from /usr/lib/systemd/user like this:
$ ls -l total 4.0K lrwxrwxrwx 1 root root 42 Mar 3 11:53 'offlineimap@.service' -> '/usr/lib/systemd/user/offlineimap@.service' drwxr-xr-x 2 root root 4.0K Mar 1 11:56 sockets.target.wants/
Is this a symlink pointing to itself? Even if that symlink is not in /usr/lib/systemd/user, what is its purpose?
What you should have (after `systemctl --user enable ...`) is a symlink in ~/.config/systemd/user/mail.target.wants/ that points to the template provided by the package and the name of this symlink should include an account name after the @. And then mail.target should also be enabled.
Last edited by Raynman (2017-03-03 22:03:01)
Offline
Try the --user flag.
systemctl start offlineimap --user
Wow; okay--that worked. Thanks! I guess something in the syntax of systemd changed? I've now enabled it with the same syntax and that worked too:
$ systemctl enable offlineimap --user
Created symlink /home/sezovr/.config/systemd/user/mail.target.wants/offlineimap.service → /usr/lib/systemd/user/offlineimap.service.
Thank you very much!
Offline
Okay, so I guess I still have a problem. After enabling the service this way:
systemctl enable offlineimap --user
and then rebooting, the service doesn't start. Is there something else I have to do?
Offline
You've now enabled a different service than the one we we're talking about before. Whether that's better, worse or just as good depends on your needs.
I answered your last question in my previous reply; maybe you missed it because you were posting around the same time.
Offline