Replies: 15 comments 7 replies
-
I've also tried removing For reference:
|
Beta Was this translation helpful? Give feedback.
-
If this is a regression please specify the last working version (and possibly even git bisect if you are able to do that). |
Beta Was this translation helpful? Give feedback.
-
Does sway work with rootful Podman? @giuseppe PTAL |
Beta Was this translation helpful? Give feedback.
-
the same commands you've provided work well for me on Fedora 38. Could it be something else blocking the access? AppArmor? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the assistance guys
@Luap99 I'm not sure if this ever worked in a rootless container. I noted it as a regression since Docker can access
@rhatdan Yes, if I run Podman with
@giuseppe Are you actually able to start Sway? I can give Fedora a shot, did you use Fedora Server or Fedora Workstation?
With OpenSuSE MicroOS and OpenSuSE Tumbleweed I've explicitly disabled SELinux and Apparmor during the installation: # SELinux
$ sudo sestatus
bash: sestatus: command not found
$ sudo getenforce
bash: getenforce: command not found
# Apparmor
$ sudo less /sys/kernel/security/apparmor/profiles
/sys/kernel/security/apparmor/profiles: No such file or directory
$ sudo apparmor_status
apparmor module is loaded.
apparmor filesystem is not mounted.
$ sudo systemctl status apparmor
○ apparmor.service - Load AppArmor profiles
Loaded: loaded (/usr/lib/systemd/system/apparmor.service; enabled; preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Mon 2023-06-12 12:02:22 CEST; 8min ago |
Beta Was this translation helpful? Give feedback.
-
Then it is not a regression for us, a regression means it worked in a previous version and then stopped working. Also docker runs as root by default unless you explicitly setup rootless docker. |
Beta Was this translation helpful? Give feedback.
-
yes, it starts. I am using Fedora Workstation 38 |
Beta Was this translation helpful? Give feedback.
-
Great find @giuseppe! Fedora Workstation 38This uses GNOME 44 out of the box. However, if I instead use tty2 I get: [wlr] [backend/wayland/backend.c:555] Could not connect to remote display: Connection refused
[sway/server.c:73] Unable to create backend For clarity: $ ls -ld /dev/tty0
crw--w----. 1 root tty 4, 0 Jun 12 14:55 /dev/tty0 Fedora Server 38This gives the same error as OpenSuSE Tumbleweed and OpenSuSE MicroOS: $ ls -ld /dev/tty0
crw--w----. 1 root tty 4, 0 Jun 12 13:51 /dev/tty0 In this case, how can a rootless container be given permission to handle seats/tty0? |
Beta Was this translation helpful? Give feedback.
-
could be wayland to block the access? |
Beta Was this translation helpful? Give feedback.
-
Hmm @giuseppe, I can't find any indication why Wayland would be the cause. Outside of Podman Sway works fine on NixOS (which is a distro that runs installed packages in user space). However, in Podman there's a check for podman/pkg/util/utils_linux.go Lines 114 to 124 in 8d0fcd4 |
Beta Was this translation helpful? Give feedback.
-
Just to clarify, Sway in Podman with:
|
Beta Was this translation helpful? Give feedback.
-
the device should still be present in the container if you explicitly bind mount it through |
Beta Was this translation helpful? Give feedback.
-
That makes sense @giuseppe but it's not accessible with either 🙁
|
Beta Was this translation helpful? Give feedback.
-
I've converted the issue to a discussion since it doesn't seem to be a Podman issue but rather a configuration problem |
Beta Was this translation helpful? Give feedback.
-
Hi, It works with: sudo podman run \
--name htpc \
--rm \
--interactive \
--tty \
--privileged \
--cap-add ALL \
--device /dev/dri \
--security-opt label=disable \
--volume /dev/tty0:/dev/tty0 \
--volume /run/dbus:/run/dbus:rslave \
--volume /run/user:/run/user:rslave \
--volume /run/systemd:/run/systemd:rslave \
--volume /run/udev:/run/udev:rslave \
--env XDG_RUNTIME_DIR=/run/user/1000 \
registry.fedoraproject.org/fedora dnf install -y seatd sway
seatd -u root &
sway But a more fine-grained mode would be appreciated. Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
I'm attempting to run Sway in rootless container but I'm unable to access
/dev/tty0
thus I can't create a graphical session.Possibly related: #15878
Here's what I've tried:
--device /dev/tty0
without success:ls: cannot access '/dev/tty0': No such file or directory
-v=/dev/tty0:/dev/tty0:rslave
results in[seatd/seat.c:60] Could not open tty0 to update VT: Permission denied
--group-add=keep-groups
+crun
doesn't make a differenceSteps to reproduce the issue
Using OpenSuSE Tumbleweed (SystemD) as Host, I've added my main user to the correct groups in order to use
--group-add=keep-groups
(run.oci.keep_original_groups=1
):For demonstration purposes I've created a rootless container which uses the root user inside of it. The same result can be observed if you use a regular user account inside the container and also if you don't specify
--group-add=keep-groups
:I've verified that
--group-add=keep-groups
works correctly withcrun
:Describe the results you received
Various scenarios for
/dev/tty0
--group-add=keep-groups
Describe the results you expected
Ability to access
/dev/tty0
podman info output
Beta Was this translation helpful? Give feedback.
All reactions