Description of problem: Can't run graphical applications in SELinux sandbox. Version-Release number of selected component (if applicable): policycoreutils-sandbox-3.2-1.fc34.x86_64 selinux-policy-sandbox-34.6-1.fc34.noarch firefox-88.0.1-1.fc34.x86_64 cinnamon-4.8.6-5.fc34.x86_64 How reproducible: Always Steps to Reproduce: $ sandbox -X -t sandbox_web_t firefox dbus[6883]: Unable to set up transient service directory: Failed to create directory /run/user/1000/dbus-1: Permission denied dbus-daemon[6883]: Cannot setup inotify for '/usr/share/dbus-1/session.d'; error 'Permission denied' /usr/bin/firefox: line 196: getenforce: command not found /usr/bin/firefox: line 196: [: !=: unary operator expected Unable to init server: Could not connect: Connection refused Error: cannot open display: :1 $ sandbox -X keepassxc dbus-daemon[9291]: Cannot setup inotify for '/usr/share/dbus-1/session.d'; error 'Permission denied' XIO: fatal IO error 2 (No such file or directory) on X server ":1" after 233 requests (233 known processed) with 8 events remaining. Some other applications show no error, but they are also not started. For example: $ sandbox -X nemo $ sandbox -X xreader Additional info: Running non-graphical applications, for example "sandbox bash", works.
Hi Marc, I created PR to our policy with new rules: https://github.com/fedora-selinux/selinux-policy/pull/972 And enabled these booleans: - setsebool -P use_fusefs_home_dirs 1 - setsebool -P xserver_clients_write_xshm 1 On Fedora34 I tested: $ sandbox -X -t sandbox_web_t firefox $ sandbox -X keepassxc $ sandbox -X nemo $ sandbox -X xreader And all applications are working. Nikola
*** This bug has been marked as a duplicate of bug 1978020 ***