You are not logged in.

#1 2021-06-20 19:50:58

VVishion
Member
Registered: 2021-06-15
Posts: 9

[SOLVED] systemctl --user enable failing

I want to auto-start ssh-agent as per this instruction https://wiki.archlinux.org/title/SSH_ke … stemd_user

If I try

systemctl --user enable ssh-agent.service

it says

Failed to enable unit: Unit file ~/.config/systemd/user/default.target.wants/ssh-agent.service does not exist.

My assumption is it tries to link

~/.config/systemd/user/ssh-agent.service

to

~/.config/systemd/user/default.target.wants/ssh-agent.service

but can't for whatever reason.

Any ideas?

Last edited by VVishion (2021-06-20 20:59:52)

Offline

#2 2021-06-20 20:06:34

VVishion
Member
Registered: 2021-06-15
Posts: 9

Re: [SOLVED] systemctl --user enable failing

I created the dir

~/.config/systemd/user/default.target.wants

manually, so the service could be linked.
It cannot be started still

systemctl --user enable ssh-agent.service

yields now

Failed to enable unit: Access denied

What can I do to give systemctl permissions for this?
sudo shouldn't be the solution because it is a user service, should it?

Last edited by VVishion (2021-06-20 20:07:01)

Offline

#3 2021-06-20 20:44:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] systemctl --user enable failing

VVishion wrote:

I created the dir

~/.config/systemd/user/default.target.wants

manually, so the service could be linked.

Permissions on the directory?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2021-06-20 20:59:34

VVishion
Member
Registered: 2021-06-15
Posts: 9

Re: [SOLVED] systemctl --user enable failing

Apparently, I executed

mkdir ~/.config/systemd

in an elevated terminal session to begin with.
Whoops. I hope you can forgive a newbie lol.
I just forgot that I created the dir myself, which didn't make me consider I just have to change the permissions/owner. Linux isn't that hard if you know what you are doing or what you did wrong after all..

Last edited by VVishion (2021-06-20 21:09:49)

Offline

Board footer

Powered by FluxBB