-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wiki: x11 guide #3602
Comments
The old x11 guide is here and the new one will be here. For now it is more of a stub. The wiki should live at man firejail-config is missing on my distribution(arch-based endeavour) imho. |
@rusty-snake Can you review? I did only find this half-baked scripting solution for synchronizing the clipboard. Do you have any idea what to use? |
I'm on wayland for two years or so. So IDK too much about this, but here are three things I noted:
|
@rusty-snake Could you exemplify what on X11 remains unsafe, if one uses network namespaces + sandboxing? I fix 2+3 later. |
If you restrict the X11 access of a sandbox to Xephyr (of whatever) it can obviously no longer do bat things like key-logger. So the most holes are closed. X11 is the only reason why we can not use
I follow the Wayland development of KDE since 2017. kwin_wayland looks good to me. However QT/KDE with Wayland is a torture. Crash, ugly window, broken clipboard, crash again, ... . GTK has full wayland support since 2015. Even firefox has good wayland support since 78 or so (before 78 you had crashes if you left-click on the wrong spot, open add-on pop-overs, ... every release a new crash, but now it's pretty good). To your question I use GNOME. The last time I tried sway (before 1.0, around summer 2018) it was lacking too much features. |
Thanks for the insight.
1+2 I found the option
We could |
|
Do you mean like this?
firemon --x11 returns all possible display numbers and |
Something like this, but I don't remember.
|
Thats not scriptable, since the status code of the first line |
TODOs:
If we can disable MIT-SHM / shared memory and performance is reasonable, we can use IPC namespacing. |
In Xephyr, just set option
You can check for enabled MIT-SHM with I don't have a solution for Xwayland started by a Wayland compositor. |
|
For sddm the configuration is in It is very annoying that Wayland provides no central place for the Wayland-specific config parts and every login manager has a different place. xorg setup commands
# run all system xinitrc shell scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for i in /etc/X11/xinit/xinitrc.d/* ; do
if [ -x "$i" ]; then
. "$i"
fi
done
fi
# Load Xsession scripts
# OPTIONFILE, USERXSESSION, USERXSESSIONRC and ALTUSERXSESSION are required
# by the scripts to work
xsessionddir="/etc/X11/Xsession.d"
OPTIONFILE=/etc/X11/Xsession.options
USERXSESSION=$HOME/.xsession
USERXSESSIONRC=$HOME/.xsessionrc
ALTUSERXSESSION=$HOME/.Xsession
if [ -d "$xsessionddir" ]; then
for i in `ls $xsessionddir`; do
script="$xsessionddir/$i"
echo "Loading X session script $script"
if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
. "$script"
fi
done
fi
if [ -d /etc/X11/Xresources ]; then
for i in /etc/X11/Xresources/*; do
[ -f $i ] && xrdb -merge $i
done
elif [ -f /etc/X11/Xresources ]; then
xrdb -merge /etc/X11/Xresources
fi
[ -f $HOME/.Xresources ] && xrdb -merge $HOME/.Xresources
if [ -f "$USERXSESSION" ]; then
. "$USERXSESSION"
fi
if [ -z "$*" ]; then
exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
else
exec $@
fi
|
The need of tools like xeyes to check what programs use Xwayland (and conversely Wayland) is very annoying. Starting XWayland sandboxed would require replacing the graphical login manager + rewriting invoking commands (in elogind or logind) of the display manager. The rabbit hole of session management is also very deep. The replacement login manager/display manager can be greetd or writing custom scripts/the Sway way of doing things. |
@rusty-snake On my OS (Firefox is also laggy and cant handle the content on maximizing, when using with KDE + Wayland. I can only use it on one screenside. I did not have issues with Falkon/Qt though.) |
I use
Use
I can only talk about mutter (GNOME), but here firefox 80 is very stable now. No crashes, flickering, broken clipboard, wrong context-menu, ... |
@rusty-snake
even though There are also no more apps with such functionality. |
I know it does not show all programs, on the other can it can show you X11-clints without window such as ibus. You can also use xprop, ... see https://fedoraproject.org/wiki/How_to_debug_Wayland_problems#Does_your_application_run_on_Wayland_natively.2C_or_uses_XWayland_.28X11_compatibility_layer.29.3F
Maybe the devs force X11 because the have bugs / missing features in wayland (HW-accel?). Or vlc still stuck on qt4. |
Setting
mitigated the issues (mostly heavy flickering with javascript or on initial resizing/maximizing the window, which still on initial loading of javascript occurs and then generally disappears after 10-15 sec).
|
This is expected behavior of Firefox. The Wayland standard implies probably unsecure applications, because it gives no user indication for its usage. This was just a big waste of time. Can I write about this in a separate Wayland guide, since this may compromise user security? |
What do you mean exactly? FYI: Weston and sway can be used w/o XWayland AFAIK and GNOME is 2 or 3 release away from it. |
Yes. However, many distros have XWayland and Wayland for compatibility. It is however not visually distinguished and easily checkable, if the program uses XWayland or Wayland. Programs can choose as they please and it would be the distros job to prevent this or ship separate versions. However, few actually do this (due to maintenance costs and no easy way in the standard to check/no simple programs available). |
Ahhh, so you want to write a warning with some background and suggest to add a
|
Summary
We could sandbox the sandbox setup to fix this or use an overlay, but thats too much clutter.
Xpra
just works, but with constant lag :(
Xephyr
-extension MIT-SHM
is used, no shared memory (more secure)TODOs
X11
-extension MIT-SHM
Wayland
(too much effort) Document how to sandbox XWayland (replace login manager, rewrite session handling in elogind/logind)just disallow X11Need to check withhack around with a huge command / upstream stuff to firejail?!xlsclients
(requires restart),xeyes
,xwininfo
, starting application withDISPLAY='' app
orWAYLAND_DEBUG=1 app
in contrast to grepping for display portsMany distros dont ship a separate name to indicate that the application definitely uses waylanddont trust distros, they dont even manage to deprecate non-XDGBDS conforming applicationsLogin managers of distros still all use X11 (session management interaction?)no useless workEach login manager uses its own scripts for the Wayland and Xwayland session, but default X11 installation setup remains in /etc/X11no useless workThe text was updated successfully, but these errors were encountered: