linuxserver / docker-webtop

Ubuntu, Alpine, Arch, and Fedora based Webtop images, Linux in a web browser supporting popular desktop environments.
GNU General Public License v3.0
1.77k stars 175 forks source link

[BUG] fedora-kde dbus unix socket shadowed by late /tmp mount #176

Closed Markarian421 closed 10 months ago

Markarian421 commented 12 months ago

Is there an existing issue for this?

Current Behavior

System Settings won't start from menu. Starting from shell (/usr/bin/systemsettings) yields:

[abc@e0f1d2994008 ~]$ systemsettings
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-abc'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-abc'
kf.dbusaddons: DBus session bus not found. To circumvent this problem try the following command (with bash):
    export $(dbus-launch)

Problem seems to be that docker-in-docker (dind) initialization does a very late mount -t tmpfs none /tmp which shadows the initial /tmp containing the dbus unix socket. (s6 svc-docker depends on svc-de and even waits 5s before calling /usr/local/bin/dockerd-entrypoint.sh. This seems due to avoid some interference with pulseaudio startup.

Have verified that e.g. introducing a dependency from svc-de to a new s6 init-tmp-mount script that does

if ! mountpoint -q /tmp; then
        mount -t tmpfs none /tmp
fi

fixes the problem.

Expected Behavior

The System Settings control panel should open.

Steps To Reproduce

This seems reproducible directly after all fresh starts of the container.

Environment

- OS: Fedora release 38 (Thirty Eight)
- How docker service was installed: Fedora 38 standard server install (using the podman emulation of docker nowadays)

CPU architecture

x86-64

Docker creation

docker container run --detach --shm-size 2G --name test --privileged -e PUID=1000 -e PGID=1000 -p 3000:3000 -p 3001:3001 --restart unless-stopped linuxserver/webtop:fedora-kde-8441b5fc-ls109

Container logs

[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

**** permissions for /dev/dri/renderD128 are good ****
**** permissions for /dev/dri/card0 are good ****
[custom-init] No custom files found, skipping...
[ls.io-init] done.
 2023-09-09 08:56:44,204 [PRIO] Connections: accepted: @192.168.113.17_1694249804.190592::websocket
github-actions[bot] commented 12 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

thelamer commented 12 months ago

Nice find, I will get a solution in the bases for audio in priv mode

LinuxServer-CI commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

thelamer commented 10 months ago

This is fixed in the latest build.

hgw77 commented 6 months ago

I just stumbled across this problem and can confirm that this problem also exists for debian-kde.

hgw77 commented 6 months ago

I helped myself with a workaround by modifying /etc/s6-overlay/s6-rc.d/svc-de/run

  1. check that tmp exist
  2. run /usr/bin/dbus-launch before startwm.sh to export the DBUS env variables systemwide
#!/usr/bin/with-contenv bash

if ! mountpoint -q /tmp; then
  mount -t tmpfs none /tmp
fi

cd $HOME
exec s6-setuidgid abc \
  /usr/bin/dbus-launch \
  /bin/bash /defaults/startwm.sh

I am not sure this is a good and general solution but it worked for debian-kde 👍