Hello,
If I use incus console container
then login the folder is there…
But if I use incus exec container -- sudo --user uname --login
the folder /run/user/1000
doesn’t exist.
I tried to see if any of the --user
services are running using:
systemctl --user list-units state=active
but it produced an error
Failed to connect to user scope bus via local transport: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)
And indeed both environment variables are empty.
If I manually export the dbus session using
export $(dbus-launch)
And run the list-unit
command again, then systemd exists with error code 1. Below is the related journalctl log
Jun 30 18:31:46 test-x-container dbus-daemon[1533]: [session uid=1000 pid=1531 pidfd=5] Activating service name='org.freedesktop.systemd1' requested by ':1.0' (uid=1000 pid=1536 comm="systemctl --user list-units state=active")
Jun 30 18:31:46 test-x-container dbus-daemon[1533]: [session uid=1000 pid=1531 pidfd=5] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
For now I just use the console mode but I’d like to hear how to troubleshoot this issue…I’ve probably done something wrong…
Thanks in advance!