SUMMARY The snap apps I have installed on my system don't run anymore since the upgrade to Plasma Wayland 5.21. It's important to say that all the snap apps worked perfectly until the version 5.20 of Plasma Wayland. STEPS TO REPRODUCE 1. Choose the snap app you want to run 2. Click the launcher OBSERVED RESULT IF you wait for the main window of the app to open, nothing happen. If you run the launcher command in a terminal, you can see the error messages. Here some examples: 1) KeePassXC ----------------------- ERROR MESSAGES ---------------------------------------- env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/keepassxc_keepassxc.desktop /snap/bin/keepassxc %f No protocol specified qt.qpa.screen: QXcbConnection: Could not connect to display :1 Could not connect to any X display. 2) Standard Notes ----------------------- ERROR MESSAGES ---------------------------------------- env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/standard-notes_standard-notes.desktop /snap/bin/standard-notes %U No protocol specified fish: Job 1, 'env BAMF_DESKTOP_FILE_HINT=/var…' terminated by signal SIGSEGV (Address boundary error) 3) Firefox ----------------------- ERROR MESSAGES ---------------------------------------- env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/firefox_firefox.desktop /snap/bin/firefox %u No protocol specified Unable to init server: Impossibile connettersi: Connection refused Error: cannot open display: :1 EXPECTED RESULT The snap apps should simply run as they run until the Plasma Wayland 5.20 version. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: KDE Neon / KDE Plasma (available in About System) KDE Plasma Version: 5.21.0 KDE Frameworks Version: 5.79.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION
I can add that only snap apps with a GUI have this issue. Snap that use only the terminal run correctly.
If you use the CLI, but run the app using `kstart5`, does the issue still happen?
It seems like an Xauthority issue.
Could it be that the Xauthority file is not forwarded to snap applications?
Yes, or they run with a private /tmp
I've installed snap on my system. X11 snap applications work as expected both in git master and 5.21. ``` ~ ❯ env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/firefox_firefox.desktop /snap/bin/firefox /usr/share/libdrm/amdgpu.ids: No such file or directory Gtk-Message: 15:19:56.118: Failed to load module "window-decorations-gtk-module" Gtk-Message: 15:19:56.118: Failed to load module "colorreload-gtk-module" [GFX1-]: glxtest: libpci missing ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost ~ 9s ❯ ``` Could it be an installation issue? or maybe neon doesn't ship some of the Xauthority patches in Plasma/5.21? As far as I understand, the contents of the host XAUTHORITY file is copied to snap. https://github.com/snapcore/snapd/blob/da5b5bb893e6bc733d63da561892901dcb42d934/cmd/snap/cmd_run.go#L534
https://github.com/snapcore/snapd/blob/da5b5bb893e6bc733d63da561892901dcb42d934/cmd/snap/cmd_run.go#L581 If I understand code correctly, snapd wants the host XAUTHORITY file to be in /tmp? If that's true, is snapd too nitpicky?
Aha, if snap can't migrate the Xauthority file, it will just use the host authority file. @Nicola can you please check what value the XAUTHORITY environment variable has? echo $XAUTHORITY
(In reply to Vlad Zahorodnii from comment #8) > Aha, if snap can't migrate the Xauthority file, it will just use the host > authority file. > > @Nicola can you please check what value the XAUTHORITY environment variable > has? > > echo $XAUTHORITY This is the output: ➤ echo $XAUTHORITY /run/user/1000/xauth_OtrFRQ
This has been fixed upstream: https://github.com/snapcore/snapd/commit/11264948f151a3573249f19a9dbd4c48666efa8c