joplin icon indicating copy to clipboard operation
joplin copied to clipboard

Desktop/Linux: Running with native Wayland support: Window missing titlebar and close button on GNOME

Open personalizedrefrigerator opened this issue 2 years ago • 17 comments

Environment

Joplin version: 2.9.17 Platform: GNOME Desktop OS specifics: Ubuntu 22.10

Steps to reproduce

  1. Run Joplin with --enable-features=UseOzonePlatform --ozone-platform=wayland command line arguments.

Observed

Joplin lacks a titlebar and window borders and the mouse cursor doesn't follow the system's theme. Additionally, Joplin's icon is the default "no icon" icon: Joplin desktop's icon is a gear symbol.

Describe what you expected to happen

Joplin should have a titlebar, like other applications, The cursor color should follow the system's theme. The Joplin window should have a non-default icon in the task manager.

Logfile

log.txt

Terminal Output

$ ./Joplin-2.9.17.AppImage --enable-features=UseOzonePlatform --ozone-platform=wayland --open-dev-tools --log-level debug
xdg-settings: invalid application name
Try 'xdg-settings --help' for more information.
[9662:1212/124816.145966:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is 

Screenshot

Screenshot of Joplin desktop. Window lacks a titlebar and close button. The mouse cursor is in light mode.

Reasons to support Wayland natively

  • Touchpad pinch zooming doesn't work with X11 or XWayland.
    • Touchpad pinch zooming is used by some plugins (e.g. js-draw).
  • Application is more likely to scale properly (without blurriness) on high-resolution displays.

Can't that be fixed by running the Linux installer? Since it also installs the icons and desktop shortcuts.

laurent22 avatar Dec 12 '22 23:12 laurent22

Can't that be fixed by running the Linux installer? Since it also installs the icons and desktop shortcuts.

I'll test it in a few hours. That should fix the icons, but I don't think it will fix the missing window titlebar.

Both issues persist after using the install script: image The icon is present when I run Joplin with XWayland, however.

As Joplin >= 2.9.1 uses Electron 18, you can try enabling WaylandWindowDecorations like this:

--enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland

but alas, this results in completely borked window decorations and faulty maximizing with GNOME 42.4 for me.

marcelmindemann avatar Dec 14 '22 13:12 marcelmindemann

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

github-actions[bot] avatar Jan 13 '23 16:01 github-actions[bot]

This is how it looks like for me with WaylandWindowDecorations added. The buttons are not actually working anyway. Also note that there is no icon in the side panel.

image

miromarszal avatar Feb 15 '23 16:02 miromarszal

Based on the comment here: https://github.com/logseq/logseq/issues/5010 , it seems that this issue will be solved upgrading Electron to 19.0.12

nuraiman avatar Mar 23 '23 18:03 nuraiman

I can confirm, Joplin-2.12.18.AppImage can start on Wayland seamlessly, without any problems. Window frame showed correctly, buttons works. See screenshot: image

AVAtarMod avatar Sep 27 '23 20:09 AVAtarMod

I can also confirm it now works for me. However, StartupWMClass is different when launching on Wayland (@joplin/app-desktop instead of Joplin) so the window is not associated with its icon. I had to adjust the .desktop file manually.

miromarszal avatar Oct 05 '23 10:10 miromarszal

Joplin-2.12.18.AppImage does not show the titlebar for me.

$ ~/.joplin/Joplin.AppImage --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland

Ubuntu 23.04 with GNOME 44.3

EDIT: Also tried Joplin-2.13.2.AppImage and same issue

benbaker76 avatar Oct 11 '23 00:10 benbaker76

Somehow the Joplin window was stuck in fullscreen mode

$ nano ~/.config/Joplin/window-state-prod.json

Set "isFullScreen":false

benbaker76 avatar Oct 11 '23 04:10 benbaker76

Seems to be running fine now in Wayland, although it lacks the proper icon

flags

--enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland

image

using JoplinAppImage in KDE plasma 6.1.2

giovanniPepi avatar Jul 18 '24 12:07 giovanniPepi

Seems to be running fine now in Wayland, although it lacks the proper icon

The official Joplin AppImage of 3.0.13 also runs fine in Wayland (using those extra flags, no proper icon) on GNOME 42.9 (Ubuntu 22.04.4), though with some errors, seemingly inconsequential:

Sentry: Initialized with autoUploadCrashDumps: false
libEGL warning: egl: failed to create dri2 screen
[242611:0723/201139.938877:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization

Interestingly, the same version available as flatpak on Flathub does not:

LaunchProcess: failed to execvp:
xdg-settings
Sentry: Initialized with autoUploadCrashDumps: false
[2:0723/201419.034805:ERROR:wayland_connection.cc(196)] Failed to connect to Wayland display: No such file or directory (2)
[2:0723/201419.034853:ERROR:ozone_platform_wayland.cc(264)] Failed to initialize Wayland platform
[2:0723/201419.034864:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.

BCSharp avatar Jul 24 '24 03:07 BCSharp

Seems to be running fine now in Wayland, although it lacks the proper icon

flags

--enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland

image

using JoplinAppImage in KDE plasma 6.1.2

joplin-appimage 3.0.14-1 fixed this

image

giovanniPepi avatar Jul 29 '24 21:07 giovanniPepi

joplin-appimage 3.0.14-1 fixed this

This is an ArchLinux' specific package. The version 3.0.14 as provided on the release page still misbehaves on Gnome 42.9 (Ubuntu 22.04.4). It seems that Joplin run on Wayland uses WM class @joplin/app-desktop, while on X11 it is simply Joplin. To fix this, my workaround is to modify the .desktop file to contain:

StartupWMClass=@joplin/app-desktop

I think ideally Joplin should use the same WM class regardless the session type it is run on.

BCSharp avatar Jul 30 '24 03:07 BCSharp