I am using the Archlinux Container image from the official server, and I noticed that systemd is not working for my user and says that dbus is not available.
The strange thing is, systemd and dbus seem to work for the root user.
Now the Archlinux Docs tell me that dbus and systemd for users should be started automatically, so I assume this is something related to using Incus/Containers.
I of course tried to start it manually, but it seems that dbus-daemon keeps on failing.
Does anyone know how to get things working?
At best without using to many things from the host, e.g. adding devices etc.
It’s basically a matter of invoking the PAM stack in a way that trigger logind properly.
A simple su/sudo doesn’t really do the trick for that.
[root@foo ~]# su blah
[blah@foo root]$ systemctl --user
Failed to connect to bus: No medium found
[blah@foo root]$
exit
[root@foo ~]# login -f blah
Last login: Mon May 13 01:28:25 on pts/1
-bash: cannot set terminal process group (-1): Inappropriate ioctl for device
-bash: no job control in this shell
[blah@foo ~]$ systemctl --user
UNIT LOAD ACTIVE SUB DESCRIPTION
sys-devices-virtual-net-eth0.device loaded active plugged /sys/devices/virtual/net/eth0
sys-subsystem-net-devices-eth0.device loaded active plugged /sys/subsystem/net/devices/eth0
-.mount loaded active mounted Root Mount
dev-.incus\x2dmounts.mount loaded active mounted /dev/.incus-mounts
dev-full.mount loaded active mounted /dev/full
dev-fuse.mount loaded active mounted /dev/fuse
dev-incus.mount loaded active mounted /dev/incus
dev-mqueue.mount loaded active mounted /dev/mqueue
dev-net-tun.mount loaded active mounted /dev/net/tun
dev-null.mount loaded active mounted /dev/null
dev-ptmx.mount loaded active mounted /dev/ptmx
dev-random.mount loaded active mounted /dev/random
dev-tty.mount loaded active mounted /dev/tty
dev-urandom.mount loaded active mounted /dev/urandom
dev-zero.mount loaded active mounted /dev/zero
dev-zfs.mount loaded active mounted /dev/zfs
proc-cpuinfo.mount loaded active mounted /proc/cpuinfo
proc-diskstats.mount loaded active mounted /proc/diskstats
proc-loadavg.mount loaded active mounted /proc/loadavg
proc-meminfo.mount loaded active mounted /proc/meminfo
proc-slabinfo.mount loaded active mounted /proc/slabinfo
proc-stat.mount loaded active mounted /proc/stat
proc-swaps.mount loaded active mounted /proc/swaps
proc-uptime.mount loaded active mounted /proc/uptime
run-user-1000.mount loaded active mounted /run/user/1000
sys-devices-system-cpu.mount loaded active mounted /sys/devices/system/cpu
sys-fs-fuse-connections.mount loaded active mounted /sys/fs/fuse/connections
sys-kernel-config.mount loaded active mounted /sys/kernel/config
sys-kernel-debug-tracing.mount loaded active mounted /sys/kernel/debug/tracing
[blah@foo ~]$