Bug 473083 - Appimage has no title-bar under Wayland: add Qt plugin wayland-decoration-client.
Summary: Appimage has no title-bar under Wayland: add Qt plugin wayland-decoration-cli...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Bundle-AppImage (show other bugs)
Version: 8.1.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-06 23:27 UTC by Bob
Modified: 2023-10-14 22:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob 2023-08-06 23:27:06 UTC
SUMMARY
***
The 8.1.0 appimage has no titlebar under Wayland. 
***

STEPS TO REPRODUCE
1. I tried launching with:
QT_QPA_PLATFORM=wayland ./Applications/digiKam-8.1.0-x86-64.appimage 

In the log output I see the messages 'unknown: EGL not available' and 'unknown: Unhandled container to remove :  Digikam::DigikamApp'

2. I then tried launching with:
QT_QPA_PLATFORM=wayland-egl ./Applications/digiKam-8.1.0-x86-64.appimage 

Digikam failed to launch. 

3. I then tried:
QT_QPA_PLATFORM=xcb ./Applications/digiKam-8.1.0-x86-64.appimage 

Digikam launched normally, with a titlebar.

OBSERVED RESULT
When run without amendment the appimage creates a window without a titlebar.

EXPECTED RESULT
The appimage should run without modification under Wayland and create a window with a titlebar.

SOFTWARE/OS VERSIONS
 Ubuntu 23.04
Comment 1 Maik Qualmann 2023-08-07 20:36:43 UTC
I can use the AppImage here under openSUSE in a native Wayland session without any problems, the title bar is available.
Setting the QT_QPA_PLATFORM environment variable with wayland, for example under X11, leads to an error message with every Qt program.

I think I've read this problem before on Ubuntu, also with other programs, since Ubuntu removes the title bar, there was some other thing that needed to be set. If I find it I'll post it here, otherwise I won't pursue the bug any further.

Maik
Comment 2 Bob 2023-08-07 21:05:17 UTC
Thanks for the response. I am running a Wayland session. I am running other appimages without issue:

BambuStudio_ubuntu-v01.07.02.51-20230804223010.AppImage
kdenlive-23.04.3-x86_64.AppImage
UltiMaker-Cura-5.4.0-linux-modern.AppImage

Bob
Comment 3 Maik Qualmann 2023-08-08 05:51:57 UTC
I can also deactivate the title bar for the respective program under Plasma. Such a setting may be stored in your window manager. In Plasma it would be Alt+F3 to get to the window settings, it will probably be a different shortcut in Ubuntu. In digiKam we do not anything special with the title bar other than setting a title.

Maik
Comment 4 Bob 2023-08-08 23:49:19 UTC
It's a good thought and the same occurred to me, but having tried all the shortcut combinations I could think of and resetting the Digikam config files, I haven't been able to find any setting that's hiding the titlebar. I installed KDE system settings to see if there was anything there, but the dialogue is all but empty as I have no KDE components installed.

Also, I have since concluded that it couldn't be this:

1. I've never had KDE/Plasma installed on this system.
2. The app has a titlebar when launched with QT_QPA_PLATFORM=xcb

I think (2) strongly suggests that this isn't a misconfiguration on my system.
Comment 5 Nicolas Fella 2023-08-13 15:30:41 UTC
Are you using Gnome?

Gnome Wayland doesn't support server-side window decoration and instead expects the application to provide window decoration.

Qt provides a plugin system for doing such client side decorations and comes with a default implementation (called bradient)

Those plugins are in /usr/lib64/qt5/plugins/wayland-decoration-client/

Most likely the appimage is missing such a plugin and thus no decoration can be created
Comment 6 Bob 2023-08-14 09:04:12 UTC
Yes I'm using Gnome on Wayland. That does sound like it might be the issue. I was aware there are some differences in the way Window decorations are handled under Wayland but didn't know the details, thanks for the explanation.
Comment 7 caulier.gilles 2023-10-07 16:31:06 UTC
from the 8.2.0 pre-release AppImage bundle digiKam-8.2.0-20231007T150049-x86-64.appimage ported to last Qt 5.15.11 :

... available at usual place : https://files.kde.org/digikam/

wayland decoration plugins are now hosted in the AppImage:

gilles@KU23:/tmp/.mount_digiKajMivIO/usr/plugins$ pwd
/tmp/.mount_digiKajMivIO/usr/plugins

gilles@KU23:/tmp/.mount_digiKajMivIO/usr/plugins$ ls -lr *way*
wayland-shell-integration:
total 317
-rwxr-xr-x 1 root root 56352 oct.   7 18:04 libxdg-shell-v6.so
-rwxr-xr-x 1 root root 48064 oct.   7 18:04 libxdg-shell-v5.so
-rwxr-xr-x 1 root root 64736 oct.   7 18:04 libxdg-shell.so
-rwxr-xr-x 1 root root 85496 oct.   7 18:04 libwl-shell.so
-rwxr-xr-x 1 root root 47984 oct.   7 18:04 libivi-shell.so
-rwxr-xr-x 1 root root 23104 oct.   7 18:04 libfullscreen-shell-v1.so

wayland-graphics-integration-server:
total 530
-rwxr-xr-x 1 root root 163384 oct.   7 18:04 libqt-wayland-compositor-xcomposite-glx.so
-rwxr-xr-x 1 root root 159288 oct.   7 18:04 libqt-wayland-compositor-xcomposite-egl.so
-rwxr-xr-x 1 root root  35600 oct.   7 18:04 libqt-wayland-compositor-wayland-eglstream-controller.so
-rwxr-xr-x 1 root root  31384 oct.   7 18:04 libqt-wayland-compositor-wayland-egl.so
-rwxr-xr-x 1 root root  27408 oct.   7 18:04 libqt-wayland-compositor-shm-emulation-server.so
-rwxr-xr-x 1 root root  64488 oct.   7 18:04 libqt-wayland-compositor-linux-dmabuf-unstable-v1.so
-rwxr-xr-x 1 root root  27312 oct.   7 18:04 libqt-wayland-compositor-drm-egl-server-buffer.so
-rwxr-xr-x 1 root root  35608 oct.   7 18:04 libqt-wayland-compositor-dmabuf-server-buffer.so

wayland-graphics-integration-client:
total 229
-rwxr-xr-x 1 root root 44048 oct.   7 18:04 libxcomposite-glx.so
-rwxr-xr-x 1 root root 64912 oct.   7 18:04 libxcomposite-egl.so
-rwxr-xr-x 1 root root 19024 oct.   7 18:04 libshm-emulation-server.so
-rwxr-xr-x 1 root root 64944 oct.   7 18:04 libqt-plugin-wayland-egl.so
-rwxr-xr-x 1 root root 18992 oct.   7 18:04 libdrm-egl-server.so
-rwxr-xr-x 1 root root 23192 oct.   7 18:04 libdmabuf-server.so

wayland-decoration-client:
total 31
-rwxr-xr-x 1 root root 31648 oct.   7 18:04 libbradient.so

Gilles Caulier
Comment 8 Bob 2023-10-14 04:26:53 UTC
I've just tried the linked 8.2 appimage, it still launches without a titlebar I'm afraid.
Comment 9 caulier.gilles 2023-10-14 04:45:03 UTC
Can you check if this appimage has the same dysfunction ?

https://binary-factory.kde.org/view/AppImage/job/Digikam_Nightly_appimage-centos7/
Comment 10 Bob 2023-10-14 22:26:45 UTC
Inconclusive, that one doesn't even want to start on Ubuntu (23.10) I'm afraid:

```
./digikam-master-381-linux-gcc-x86_64.AppImage                                                                         
-- digiKam Linux AppImage Bundle                                                                                                                 
-- Use 'help' as CLI argument to know all available options for digiKam application.                                                             
-- Notes: to integrate this bundle to your desktop, use AppImageLauncher.                                                                        
--        to enable all debug messages on the console, use 'export QT_LOGGING_RULES="digikam*=true"'.
-- Detected host Linux ubuntu-64-23.10
-- AppImage mounted directory: /tmp/.mount_digikaHnSI0k
Check library libudev.so.0
Check library libxcb-dri3.so.0
Check library libcrypto.so.1.1
Check library libssl.so.1.1
Check library libnss3.so
Check library libnssutil3.so
Check library libsmime3.so
Check library libpango-1.0.so.0
Check library libpangocairo-1.0.so.0 
Check library libgmodule-2.0.so.0
-- Preloading shared libs: :/usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0:/usr/lib/x86_64-linux-gnu/libnss3.so:/usr/lib/x86_64-linux-gnu/libnssutil3.so:/usr/lib/x86_64-linux-gnu/libsmime3.so:/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0:/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0:/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 
digikam: symbol lookup error: /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: g_string_free_and_steal
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QSocketNotifier: Can only be used with threads started with QThread
/tmp/.mount_digikaHnSI0k/AppRun.wrapped: symbol lookup error: /lib/x86_64-linux-gnu/libEGL_mesa.so.0: undefined symbol: wl_proxy_marshal_flags
```