VeraCrypt
VeraCrypt copied to clipboard
No system tray icon on KDE Plasma 6, Fedora 40
Similar to https://github.com/veracrypt/VeraCrypt/issues/461, but on KDE Plasma 6, Fedora 40, 64-bit, wayland, installed using
RPM packages: CentOS 8/Fedora 38: GUI: veracrypt-1.26.7-CentOS-8-x86_64.rpm
Expected behavior
System tray icon to appear.
Observed behavior
For other applications, system tray icon appears.
For veracrypt, no system tray icon, no matter if active, in background, or other.
Straight after launch, I check the journal log with journalctl -r
and see
fedora veracrypt: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
If I run in terminal sudo veracrypt
the tray icon appears.
If I run it from application menu or just veracrypt
, no tray icon appears.
Steps to reproduce
- Launch veracrypt
I can replicate the issue on my VM. VeraCrypt uses wxWidgets for it's non-Windows GUI, and wxWidgets implements GtkStatusIcon which is deprecated as of GTK3.14. I went through bunch of discussions on wxWidgets Google groups, Github issues and forums but didn't really got closer to figuring out what's the root cause of the problem.
wxWidgets seems to check whether you are running X11 windowing system and reports that the tray icons are not available. See this. It is most likely that GTK has deprecated the GtkStatusIcon which wxWidgets implements and there is no guarantee of it working. But I'm unsure why it seems to only affect the Wayland backend.
From following commit https://github.com/wxWidgets/wxWidgets/commit/1761bc3a88ce930aba556e480c5352d69a806bf5
Taskbar is not supported by all window managers and desktop environments
under Linux and IsAvailable() function should be used to check whether it
is supported. In addition, even when the taskbar is supported, some
environments don't support showing the application-specified tooltip for
the icon in it.
Due to this, there's no guarantee that wxTaskBarIcon will work correctly
under Linux and so the applications should use it only as an optional
component of their user interface. The user should be required to
explicitly enable the taskbar icon on Unix, it shouldn't be on by default.
As a workaround as long as you have XWayland installed, you can launch the program with X11 backend and from my testing the tray icon should work. You can do this by right clicking the VeraCrypt application in your start menu and pressing "Edit application" and in the Application tab, set the environment variable to GDK_BACKEND=x11
. You can also do this by editing the veracrypt.desktop
file either in ~/.local/share/applications/
or /usr/share/applications/
and changing the executable line to Exec=env GDK_BACKEND=x11 /usr/bin/veracrypt %f
.
The reason it works for you when you launch it with sudo
is that it is launched in XWayland mode instead of native Wayland.