Loginctl No such File or Directory
[myuser@arch ~]$ loginctl enable-linger myuser
Could not enable linger: No such file or directory
Why? Extra points if you can answer why there is such a fascination with ridiculous vague errors.
EDIT: Solution is to ditch loginctl and just do it yourself.
sudo mkdir -p /var/lib/systemd/linger/
sudo touch /var/lib/systemd/linger/$USER
Edited 6 May 2019. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 2 · 100% up
- Kind
- Text
- ID
- bl9vcf
8 comments
This is an upstream bug https://github.com/systemd/systemd/issues/12401
loginctl list-sessions[myuser@arch ~]$ loginctl list-sessions
SESSION UID USER SEAT TTY
1 1000 myuser
3 1000 myuser pts/1
4 1000 myuser pts/2
3 sessions listed.
Is dbus wonky?
systemctl status dbus.socketsystemctl --user status dbus.socketLOL
At no point was the folder mentioned in any error, syslog, or context. I found this on a completely unrelated bug report. It should have created this folder on its own if it did not exist or mentioned it in the error. Even after fixing it the command STILL did not function. Worth pointing out the the final solution was to just bypass it and do what the command was suppose to do manually.
After
sudo mkdir -p /var/lib/systemd/linger/sudo touch /var/lib/systemd/linger/$USERI got
Could not enable linger: Read-only file system