flatpak / flatpak

Linux application sandboxing and distribution framework
https://flatpak.org
GNU Lesser General Public License v2.1
4.18k stars 397 forks source link

[Bug]: [1.12.x] Cannot export X Display to flatpak with X11Forwarding #5242

Open cforain opened 1 year ago

cforain commented 1 year ago

Checklist

Flatpak version

1.12.4

What Linux distribution are you using?

Other (specify below)

Linux distribution version

Linux steamdeck 5.13.0-valve36-1-neptune #1 SMP PREEMPT Mon, 19 Dec 2022 23:39:41 +0000 x86_64 GNU/Linux

What architecture are you using?

x86_64

How to reproduce

I'm trying to use my Steamdeck as a dedicated stream PC. It mostly works, the only missing final piece is a way to open OBS Studio from my desktop, since I don´t have a dedicated monitor for the SteamDeck

  1. Install OBS Studio on SteamDeck through their GUI. At this point, I can open OBS locally on the SteamDeck and it works perfectly.
  2. Looking at the created OBS shortcut, we can see that it runs OBS by running the following command: /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=obs com.obsproject.Studio
  3. If I run this command locally on Steamdeck, it works as expected
  4. Go to my desktop, connect using either ssh -X or ssh -Y to Steamdeck
  5. If I run the aforementioned command, I get:
    
    qt.qpa.xcb: could not connect to display 
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-egl, wayland, xcb.

6. To try to isolate the problem from QT issues, I did the same procedure for a GTK app, Firefox, running this command: `flatpak run --env=DISPLAY=$DISPLAY --share=network --branch=stable --arch=x86_64 --command=firefox --file-forwarding org.mozilla.firefox @@u %u @@` , which gives me:

Error: no DISPLAY environment variable specified


7. To ensure that this isn't an ssh configuration problem, I tried running native apps through `ssh -X` such as `konsole`, and it works as expected
8. Looking at the Steamdeck env, there is indeed a display environment variable: 

(1)(deck@steamdeck ~)$ env |grep -i display DISPLAY=localhost:10.0

So, searching for past issues ([this](https://github.com/flatpak/flatpak/issues/397) and [this](https://github.com/flatpak/flatpak/pull/4706)), I tried to run it by running the following (and some variations with/without `--socket` `--nosocket` `--env` `-c`), to no avail:
 - `/usr/bin/flatpak run -vv --share=network --branch=stable --arch=x86_64 --nosocket=fallback-x11 --socket=x11 --command=obs com.obsproject.Studio`
 - `DISPLAY=$DISPLAY /usr/bin/flatpak run -vv --share=network --branch=stable --arch=x86_64 --nosocket=fallback-x11 --socket=x11 --command=obs com.obsproject.Studio`
 - `DISPLAY=localhost:10.0 /usr/bin/flatpak run -vv --share=network --branch=stable --arch=x86_64 --nosocket=fallback-x11 --socket=x11 --command=obs com.obsproject.Studio`
 - `/usr/bin/flatpak run -vv --share=network --branch=stable --arch=x86_64 --nosocket=fallback-x11 --socket=x11 --command=obs com.obsproject.Studio -c "DISPLAY=$DISPLAY obs"`
 - `/usr/bin/flatpak run -vv --share=network --branch=stable --arch=x86_64 --nosocket=fallback-x11 --socket=x11 --command=obs com.obsproject.Studio  --env="DISPLAY=$DISPLAY"`

 Much to the same results. While running it verbosely, I noticed that the log sets env variables through `--setenv`, which I cannot reproduce through the aforementioned commands.

 I wonder if I'm missing something obvious here. Thanks in advance.

### Expected Behavior

OBS Studio should run on Steamdeck and show up as a window on my desktop, the same way native apps do.

### Actual Behavior

I get errors, pointing to the package not being able to find the DISPLAY variable.

### Additional Information

Full trace while trying to run the command: `/usr/bin/flatpak run -vv --share=network --branch=stable --arch=x86_64 --nosocket=fallback-x11 --socket=x11 --command=obs com.obsproject.Studio`

F: No installations directory in /etc/flatpak/installations.d. Skipping F: Opening system flatpak installation at path /var/lib/flatpak F: Opening user flatpak installation at path /home/deck/.local/share/flatpak F: Opening user flatpak installation at path /home/deck/.local/share/flatpak F: Opening system flatpak installation at path /var/lib/flatpak F: Opening user flatpak installation at path /home/deck/.local/share/flatpak F: Opening system flatpak installation at path /var/lib/flatpak F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/lib32 does not exist F: Cleaning up unused container id 705359907 F: Cleaning up per-app-ID state for org.mozilla.firefox F: Allocated instance id 3184245057 F: Add defaults in dir /com/obsproject/Studio/ F: Add locks in dir /com/obsproject/Studio/ F: Allowing host-fs access F: ignoring blocking autofs path /efi F: ignoring blocking autofs path /esp F: Allowing wayland access F: Allowing x11 access F: Allowing pulseaudio access F: Pulseaudio user configuration file '/home/deck/.config/pulse/client.conf': Error opening file /home/deck/.config/pulse/client.conf: No such file or directory F: bwrap --args 35 = ... F: --ro-bind F: /efi F: /efi F: --ro-bind F: /esp F: /esp F: --ro-bind F: /home F: /home F: --bind F: /var F: /var F: --ro-bind F: /dev F: /dev F: --bind F: /run F: /run F: --ro-bind F: /etc F: /etc F: --bind F: /tmp F: /tmp F: --ro-bind F: /sys F: /sys F: --ro-bind F: /proc F: /proc F: --ro-bind F: /usr F: /usr F: --symlink F: usr/bin F: /bin F: --ro-bind F: /boot F: /boot F: --symlink F: usr/lib F: /lib F: --symlink F: usr/lib F: /lib64 F: --symlink F: var/mnt F: /mnt F: --ro-bind F: /opt F: /opt F: --symlink F: usr/bin F: /sbin F: --ro-bind F: /srv F: /srv F: --ro-bind F: /.steamos F: /.steamos F: --ro-bind F: /root F: /root F: --bind F: /run/user/1000/.dbus-proxy/ F: /run/user/1000/.dbus-proxy/ F: --file F: 36 F: /.flatpak-info F: bwrap --args 39 = ... F: --fd=38 F: unix:path=/run/user/1000/bus F: /run/user/1000/.dbus-proxy/session-bus-proxy-4V5HY1 F: --filter F: '--own=com.obsproject.Studio.' F: '--own=org.mpris.MediaPlayer2.com.obsproject.Studio.' F: --talk=com.canonical.AppMenu.Registrar F: --talk=org.kde.StatusNotifierWatcher F: --talk=org.freedesktop.Notifications F: --talk=org.freedesktop.Flatpak F: --own=org.kde.StatusNotifierItem-2-2 F: --talk=org.a11y.Bus F: '--call=org.freedesktop.portal.=' F: '--broadcast=org.freedesktop.portal.=@/org/freedesktop/portal/' F: unix:path=/var/run/dbus/system_bus_socket F: /run/user/1000/.dbus-proxy/system-bus-proxy-ZV5HY1 F: --filter F: --talk=org.freedesktop.Avahi F: 'unix:path=/run/user/1000/at-spi/bus_0,guid=b56d5d1ebaab9348327f0c7163b4f073' F: /run/user/1000/.dbus-proxy/a11y-bus-proxy-QI3HY1 F: --filter F: --sloppy-names F: --call=org.a11y.atspi.Registry=org.a11y.atspi.Socket.Embed@/org/a11y/atspi/accessible/root F: --call=org.a11y.atspi.Registry=org.a11y.atspi.Socket.Unembed@/org/a11y/atspi/accessible/root F: --call=org.a11y.atspi.Registry=org.a11y.atspi.Registry.GetRegisteredEvents@/org/a11y/atspi/registry F: --call=org.a11y.atspi.Registry=org.a11y.atspi.DeviceEventController.GetKeystrokeListeners@/org/a11y/atspi/registry/deviceeventcontroller F: --call=org.a11y.atspi.Registry=org.a11y.atspi.DeviceEventController.GetDeviceEventListeners@/org/a11y/atspi/registry/deviceeventcontroller F: --call=org.a11y.atspi.Registry=org.a11y.atspi.DeviceEventController.NotifyListenersSync@/org/a11y/atspi/registry/deviceeventcontroller F: --call=org.a11y.atspi.Registry=org.a11y.atspi.DeviceEventController.NotifyListenersAsync@/org/a11y/atspi/registry/deviceeventcontroller F: Running 'bwrap --args 35 xdg-dbus-proxy --args=39' F: bwrap --args 36 = ... F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files F: /usr F: --lock-file F: /usr/.ref F: --ro-bind F: /var/lib/flatpak/app/com.obsproject.Studio/x86_64/stable/694f40fda5aea03f5daf53db094cdcc5c29e62fa507d49d5bcfe399c55809ecd/files F: /app F: --lock-file F: /app/.ref F: --ro-bind F: /var/lib/flatpak/runtime/com.obsproject.Studio.Locale/x86_64/stable/b8a2be9df45bcbca0d4082f673f0e4636025fe86842c54d1a65234930b9038d8-en/files F: /app/share/runtime/locale F: --tmpfs F: /usr/lib/x86_64-linux-gnu/GL F: --ro-bind F: /var/lib/flatpak/runtime/org.freedesktop.Platform.GL.default/x86_64/21.08/e10dc0a5370f7e421617e58cd96e0e171db640681442e9e78dfa576df801bfcd/files F: /usr/lib/x86_64-linux-gnu/GL/default F: --ro-bind F: /var/lib/flatpak/runtime/org.freedesktop.Platform.openh264/x86_64/2.0/73f998362a6fc0d57e0c7e83e928d32b0ec14d10d0d94291033976bdcecc6b6b/files F: /usr/lib/x86_64-linux-gnu/openh264 F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform.Locale/x86_64/6.3/6de4a045a5c8e69cf8880b623e6627f24f3e071a12f8aff91fdc6c1c0212a11e-en/files F: /usr/share/runtime/locale F: --tmpfs F: /usr/share/runtime/share/themes F: --ro-bind F: /var/lib/flatpak/runtime/org.gtk.Gtk3theme.Breeze/x86_64/3.22/b0fa933ccbd3f83684c87fbc530cb8425dd8d997bcc7a6c017dfffc7559d991b/files F: /usr/share/runtime/share/themes/Breeze/gtk-3.0 F: --ro-bind-data F: 15 F: /run/flatpak/ld.so.conf.d/runtime-001-org.freedesktop.Platform.GL.default.conf F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/vulkan/icd.d/lvp_icd.x86_64.json F: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/lvp_icd.x86_64.json F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/vulkan/icd.d/virtio_icd.x86_64.json F: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/virtio_icd.x86_64.json F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/vulkan/icd.d/intel_icd.x86_64.json F: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/intel_icd.x86_64.json F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/vulkan/icd.d/radeon_icd.x86_64.json F: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/glvnd/egl_vendor.d/50_mesa.json F: /usr/lib/x86_64-linux-gnu/GL/glvnd/egl_vendor.d/50_mesa.json F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/OpenCL/vendors/mesa.icd F: /usr/lib/x86_64-linux-gnu/GL/OpenCL/vendors/mesa.icd F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/nouveau_vieux_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/nouveau_vieux_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/swrast_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/swrast_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/libmesa_dri_drivers.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/libmesa_dri_drivers.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/nouveau_drv_video.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/nouveau_drv_video.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/libgallium_drv_video.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/libgallium_drv_video.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/r300_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/r300_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/radeonsi_drv_video.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/i915_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/i915_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/crocus_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/crocus_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/vmwgfx_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/vmwgfx_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/zink_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/zink_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/r600_drv_video.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/r600_drv_video.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/nouveau_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/nouveau_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/iris_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/iris_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/libgallium_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/libgallium_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/i965_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/i965_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/r600_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/r600_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/i830_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/i830_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/virtio_gpu_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/virtio_gpu_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/radeonsi_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/radeon_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeon_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/kms_swrast_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/kms_swrast_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/r200_dri.so F: /usr/lib/x86_64-linux-gnu/GL/lib/dri/r200_dri.so F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/d3d/d3dadapter9.so.1.0.0 F: /usr/lib/x86_64-linux-gnu/GL/lib/d3d/d3dadapter9.so.1.0.0 F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/lib/d3d/d3dadapter9.so.1 F: /usr/lib/x86_64-linux-gnu/GL/lib/d3d/d3dadapter9.so.1 F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json F: /usr/lib/x86_64-linux-gnu/GL/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json F: --symlink F: /usr/lib/x86_64-linux-gnu/GL/default/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json F: /usr/lib/x86_64-linux-gnu/GL/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json F: --ro-bind-data F: 16 F: /run/flatpak/ld.so.conf.d/runtime-002-org.freedesktop.Platform.openh264.conf F: --proc F: /proc F: --unshare-pid F: --dir F: /tmp F: --dir F: /var/tmp F: --dir F: /run/host F: --dir F: /run/user/1000 F: --setenv F: XDG_RUNTIME_DIR F: /run/user/1000 F: --symlink F: ../run F: /var/run F: --ro-bind F: /sys/block F: /sys/block F: --ro-bind F: /sys/bus F: /sys/bus F: --ro-bind F: /sys/class F: /sys/class F: --ro-bind F: /sys/dev F: /sys/dev F: --ro-bind F: /sys/devices F: /sys/devices F: --ro-bind-try F: /proc/self/ns/user F: /run/.userns F: --symlink F: /etc/timezone F: /var/db/zoneinfo F: --ro-bind-data F: 18 F: /etc/passwd F: --ro-bind-data F: 19 F: /etc/group F: --ro-bind-data F: 20 F: /etc/pkcs11/pkcs11.conf F: --ro-bind F: /etc/machine-id F: /etc/machine-id F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/issue.net F: /etc/issue.net F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/geoclue F: /etc/geoclue F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/wgetrc F: /etc/wgetrc F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/xattr.conf F: /etc/xattr.conf F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/alsa F: /etc/alsa F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/rc_keymaps F: /etc/rc_keymaps F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/issue F: /etc/issue F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/nsswitch.conf F: /etc/nsswitch.conf F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/ld.so.cache F: /etc/ld.so.cache F: --symlink F: ../usr/lib/os-release F: /etc/os-release F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/ssh_config F: /etc/ssh_config F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/ld.so.conf F: /etc/ld.so.conf F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/dbus-1 F: /etc/dbus-1 F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/xdg F: /etc/xdg F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/ssl F: /etc/ssl F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/rc_maps.cfg F: /etc/rc_maps.cfg F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/services F: /etc/services F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/pulse F: /etc/pulse F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/e2scrub.conf F: /etc/e2scrub.conf F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/fonts F: /etc/fonts F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/gtk-3.0 F: /etc/gtk-3.0 F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/protocols F: /etc/protocols F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/moduli F: /etc/moduli F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/mke2fs.conf F: /etc/mke2fs.conf F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/pki F: /etc/pki F: --symlink F: ../../proc/self/mounts F: /etc/mtab F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/vdpau_wrapper.cfg F: /etc/vdpau_wrapper.cfg F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/profile.d F: /etc/profile.d F: --ro-bind F: /var/lib/flatpak/runtime/org.kde.Platform/x86_64/6.3/da5db79df3afb70fe080b06f44b84ef1db3400ea8eb8cba77c22ab07c9065f64/files/etc/rpc F: /etc/rpc F: --bind F: /home/deck/.var/app/com.obsproject.Studio/cache F: /var/cache F: --bind F: /home/deck/.var/app/com.obsproject.Studio/data F: /var/data F: --bind F: /home/deck/.var/app/com.obsproject.Studio/config F: /var/config F: --bind F: /home/deck/.var/app/com.obsproject.Studio/cache/tmp F: /var/tmp F: --symlink F: usr/bin F: /bin F: --symlink F: usr/lib F: /lib F: --symlink F: usr/lib64 F: /lib64 F: --symlink F: usr/sbin F: /sbin F: --ro-bind F: /usr/share/zoneinfo F: /usr/share/zoneinfo F: --symlink F: ../usr/share/zoneinfo/America/Los_Angeles F: /etc/localtime F: --ro-bind-data F: 21 F: /etc/timezone F: --seccomp F: 22 F: --ro-bind F: /run/user/1000/.flatpak-helper/monitor F: /run/host/monitor F: --symlink F: /run/host/monitor/resolv.conf F: /etc/resolv.conf F: --symlink F: /run/host/monitor/host.conf F: /etc/host.conf F: --symlink F: /run/host/monitor/hosts F: /etc/hosts F: --symlink F: /run/host/monitor/gai.conf F: /etc/gai.conf F: --ro-bind-data F: 27 F: /etc/pkcs11/modules/p11-kit-trust.module F: --ro-bind F: /run/user/1000/.flatpak-helper/pkcs11-flatpak-3096 F: /run/flatpak/p11-kit/pkcs11 F: --ro-bind-data F: 28 F: /etc/ld.so.conf F: --ro-bind-data F: 17 F: /etc/ld.so.cache F: --ro-bind F: /run/user/1000/.flatpak/3184245057 F: /run/flatpak/.flatpak/3184245057 F: --lock-file F: /run/flatpak/.flatpak/3184245057/.ref F: --file F: 29 F: /.flatpak-info F: --ro-bind-data F: 30 F: /.flatpak-info F: --setenv F: container F: flatpak F: --ro-bind-data F: 31 F: /run/host/container-manager F: --info-fd F: 32 F: --bind F: /run/user/1000/.flatpak/com.obsproject.Studio/xdg-run F: /run/user/1000 F: --bind F: /run/user/1000/doc/by-app/com.obsproject.Studio F: /run/flatpak/doc F: --dev-bind F: /dev F: /dev F: --tmpfs F: /dev/shm F: --bind F: /run/user/1000/.flatpak/com.obsproject.Studio/tmp F: /tmp F: --bind F: /run/user/1000/app/com.obsproject.Studio F: /run/flatpak/app/com.obsproject.Studio F: --bind F: /.steamos F: /.steamos F: --bind F: /home F: /home F: --dir F: /home/deck F: --ro-bind F: /home/deck/.config/kdeglobals F: /home/deck/.config/kdeglobals F: --tmpfs F: /home/deck/.local/share/flatpak F: --tmpfs F: /home/deck/.var/app F: --bind F: /home/deck/.var/app/com.obsproject.Studio F: /home/deck/.var/app/com.obsproject.Studio F: --symlink F: var/mnt F: /mnt F: --bind F: /opt F: /opt F: --bind F: /run/media F: /run/media F: --bind F: /run/user/1000/pipewire-0 F: /run/user/1000/pipewire-0 F: --bind F: /srv F: /srv F: --bind F: /var/mnt F: /var/mnt F: --bind F: /usr F: /run/host/usr F: --symlink F: usr/bin F: /run/host/bin F: --symlink F: usr/lib F: /run/host/lib F: --symlink F: usr/lib F: /run/host/lib64 F: --symlink F: usr/bin F: /run/host/sbin F: --bind F: /etc F: /run/host/etc F: --ro-bind F: /etc/os-release F: /run/host/os-release F: --ro-bind F: /home/deck/.config/kdeglobals F: /home/deck/.var/app/com.obsproject.Studio/config/kdeglobals F: --ro-bind F: /home/deck/.config/user-dirs.dirs F: /home/deck/.var/app/com.obsproject.Studio/config/user-dirs.dirs F: --tmpfs F: /tmp/.X11-unix F: --ro-bind-data F: 34 F: /run/flatpak/pulse/config F: --ro-bind F: /run/user/1000/pulse/native F: /run/flatpak/pulse/native F: --dev-bind F: /dev/snd F: /dev/snd F: --ro-bind F: /run/user/1000/.dbus-proxy/session-bus-proxy-4V5HY1 F: /run/flatpak/bus F: --ro-bind F: /run/user/1000/.dbus-proxy/system-bus-proxy-ZV5HY1 F: /run/dbus/system_bus_socket F: --ro-bind F: /run/user/1000/.dbus-proxy/a11y-bus-proxy-QI3HY1 F: /run/flatpak/at-spi-bus F: --sync-fd F: 37 F: --ro-bind F: /run/user/1000/.flatpak/com.obsproject.Studio/.ref F: /run/flatpak/per-app-dirs-ref F: --lock-file F: /run/flatpak/per-app-dirs-ref F: --bind F: /run/systemd/resolve/io.systemd.Resolve F: /run/systemd/resolve/io.systemd.Resolve F: --ro-bind F: /run/systemd/journal/socket F: /run/systemd/journal/socket F: --ro-bind F: /run/systemd/journal/stdout F: /run/systemd/journal/stdout F: --ro-bind F: /usr/share/fonts F: /run/host/fonts F: --tmpfs F: /run/host/fonts-cache F: --remount-ro F: /run/host/fonts-cache F: --ro-bind F: /home/deck/.cache/fontconfig F: /run/host/user-fonts-cache F: --ro-bind-data F: 35 F: /run/host/font-dirs.xml F: --ro-bind F: /usr/share/icons F: /run/host/share/icons F: --ro-bind F: /home/deck/.local/share/icons F: /run/host/user-share/icons F: --symlink F: /app/lib/debug/source F: /run/build F: --symlink F: /usr/lib/debug/source F: /run/build-runtime F: --setenv F: AT_SPI_BUS_ADDRESS F: unix:path=/run/flatpak/at-spi-bus F: --setenv F: DBUS_SESSION_BUS_ADDRESS F: unix:path=/run/flatpak/bus F: --setenv F: DBUS_SYSTEM_BUS_ADDRESS F: unix:path=/run/dbus/system_bus_socket F: --setenv F: EDITOR F: vim F: --setenv F: FLATPAK_ID F: com.obsproject.Studio F: --setenv F: FLATPAK_SANDBOX_DIR F: /home/deck/.var/app/com.obsproject.Studio/sandbox F: --setenv F: GI_TYPELIB_PATH F: /app/lib/girepository-1.0 F: --setenv F: GST_PLUGIN_PATH F: /app/lib/gstreamer-1.0:/usr/lib/extensions/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0 F: --setenv F: HOME F: /home/deck F: --setenv F: KDE_FORK_SLAVES F: 1 F: --setenv F: LANG F: en_US.UTF-8 F: --setenv F: LD_LIBRARY_PATH F: '' F: --setenv F: LIBVA_DRIVER_NAME F: radeonsi F: --setenv F: LOGNAME F: deck F: --setenv F: MAIL F: /var/spool/mail/deck F: --setenv F: MOTD_SHOWN F: pam F: --setenv F: MOZ_ENABLE_WAYLAND F: 1 F: --setenv F: MOZ_USE_XINPUT2 F: 1 F: --setenv F: PATH F: /app/bin:/usr/bin F: --setenv F: PS1 F: '[📦 $FLATPAK_ID \W]\$ ' F: --setenv F: PULSE_CLIENTCONFIG F: /run/flatpak/pulse/config F: --setenv F: PULSE_SERVER F: unix:/run/flatpak/pulse/native F: --setenv F: PWD F: /home/deck F: --setenv F: QML2_IMPORT_PATH F: /app/lib64/qml:/app/lib/qml F: --setenv F: QT_PLUGIN_PATH F: /app/lib64/plugins:/app/lib/plugins:/usr/share/runtime/lib/plugins F: --setenv F: SHELL F: /bin/sh F: --setenv F: SHLVL F: 2 F: --setenv F: SSH_CLIENT F: '192.168.0.14 40450 22' F: --setenv F: SSH_CONNECTION F: '192.168.0.14 40450 192.168.0.21 22' F: --setenv F: SSH_TTY F: /dev/pts/2 F: --setenv F: TERM F: xterm-256color F: --setenv F: USER F: deck F: --setenv F: VST_PATH F: /app/extensions/Plugins/lxvst F: --setenv F: XDG_CACHE_HOME F: /home/deck/.var/app/com.obsproject.Studio/cache F: --setenv F: XDG_CONFIG_DIRS F: /app/etc/xdg:/etc/xdg F: --setenv F: XDG_CONFIG_HOME F: /home/deck/.var/app/com.obsproject.Studio/config F: --setenv F: XDG_DATA_DIRS F: /app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share F: --setenv F: XDG_DATA_HOME F: /home/deck/.var/app/com.obsproject.Studio/data F: --setenv F: XDG_SESSION_CLASS F: user F: --setenv F: XDG_SESSION_ID F: 21 F: --setenv F: XDG_SESSIONTYPE F: tty F: --setenv F: F: /usr/bin/flatpak F: --setenv F: __EGL_EXTERNAL_PLATFORM_CONFIG_DIRS F: /etc/egl/egl_external_platform.d:/usr/lib/x86_64-linux-gnu/GL/egl/egl_external_platform.d:/usr/share/egl/egl_external_platform.d F: Running 'bwrap --args 36 obs' qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-egl, wayland, xcb.

cforain commented 1 year ago

Just an update: I installed OBS natively, worked as expected. Would be nice to use the flatpak version tho, if possible. Thanks.

smcv commented 1 year ago

The debug log with -vv confirms that Flatpak is trying to enable X11 access. I suspect this means that none of the records in the Xauth file generated by your ssh are in a form that Flatpak can understand.

In an environment where your X connection is being forwarded, what do xauth -v list and xauth -v nlist say? You can replace the long hex strings with XXX or something if you are concerned about them being private.

In my normal GNOME session with DISPLAY=:0, I have:

$ echo $DISPLAY
:0
$ xauth -v list 
Using authority file /run/user/1000/.mutter-Xwaylandauth.2T76X1
momentum/unix:  MIT-MAGIC-COOKIE-1  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#ffff#6d6f6d656e74756d#:  MIT-MAGIC-COOKIE-1  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
$ xauth -v nlist
Using authority file /run/user/1000/.mutter-Xwaylandauth.2T76X1
0100 0008 6d6f6d656e74756d 0000  0012 4d49542d4d414749432d434f4f4b49452d31 0010 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ffff 0008 6d6f6d656e74756d 0000  0012 4d49542d4d414749432d434f4f4b49452d31 0010 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

where momentum (hex: 6d6f6d656e74756d) is my hostname, 4d49542d4d414749432d434f4f4b49452d31 is the hex-encoding of MIT-MAGIC-COOKIE-1 (echo 4d49542d4d414749432d434f4f4b49452d31 | xxd -ps -r to verify), and there is a random hex string which I've replaced with XXX... to keep it secret.

If I'm interpreting this correctly, I think this means I have one authorization record of type 0x0100 (FamilyLocal) and one of type 0xffff (FamilyWild), each with an 8-byte name momentum, a 0-byte display number, a 18-byte protocol MIT-MAGIC-COOKIE-1, and a 16-byte protocol-specific secret.

In a ssh -Y session to the same machine, I have:

$ echo $DISPLAY
localhost:10.0
$ xauth -v list
Using authority file /home/smcv/.Xauthority
momentum/unix:10  MIT-MAGIC-COOKIE-1  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
$ xauth -v nlist
Using authority file /home/smcv/.Xauthority
0100 0008 6d6f6d656e74756d 0002 3130 0012 4d49542d4d414749432d434f4f4b49452d31 0010 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

If I'm interpreting this correctly, it's a single record of type FamilyLocal, an 8-byte hostname momentum, a 2-byte display number 10, an 18-byte protocol name MIT-MAGIC-COOKIE-1, and a 16-byte secret.

What does this look like on your system?

smcv commented 1 year ago

Flatpak version 1.12.4

This is an outdated version, and 1.12.7 has some fixes for remote X11 (including X11 forwarding) which might be relevant. The Steam Deck is using a rolling-release distribution, so I'm surprised it still has Flatpak 1.12.4; please check for OS upgrades if you haven't already. I would hope that it will have either 1.12.7 or 1.14.x available via an OS update, either now or in future.

cforain commented 1 year ago

Thanks for the quick response. The OS is updated to the last stable, I will update the thread once flatpak has been updated.

That being said, about the outputs for ssh -X:

xauth -v list
Using authority file /home/deck/.Xauthority
steamdeck/unix:10  MIT-MAGIC-COOKIE-1  MY_HEX_1

xauth -v nlist
Using authority file /home/deck/.Xauthority
0100 0009 MY_HEX_2 0002 3130 0012 MY_HEX_3 0010 MY_HEX_1

for ssh -Y:

xauth -v list
Using authority file /home/deck/.Xauthority
steamdeck/unix:10  MIT-MAGIC-COOKIE-1  MY_HEX_4

xauth -v nlist
Using authority file /home/deck/.Xauthority
0100 0009 MY_HEX_5 0002 3130 0012 MY_HEX_6 0010 MY_HEX_4
smcv commented 1 year ago

That all looks similar to what I see on Debian, so I suspect the problem might just be that your version of Flatpak is too old to have #4706 (which would make this probably a duplicate of #397).

smcv commented 1 year ago

Someone posted a comment here involving sudo flatpak run, although it seems that comment has now been deleted.

For anyone who saw that comment via email notification: sudo flatpak run is never the right solution, please don't do that.

(sudo flatpak update might sometimes be appropriate, and that's fine: it is specifically flatpak run that should never be run via sudo, and should not normally be run as root at all.)