Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No system tray icon on KDE Plasma 6, Fedora 40 #1339

Open
LinuxEnthusiast99 opened this issue May 12, 2024 · 1 comment
Open

No system tray icon on KDE Plasma 6, Fedora 40 #1339

LinuxEnthusiast99 opened this issue May 12, 2024 · 1 comment
Labels

Comments

@LinuxEnthusiast99
Copy link

LinuxEnthusiast99 commented May 12, 2024

Similar to #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

  1. Launch veracrypt
@Jertzukka
Copy link
Contributor

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 wxWidgets/wxWidgets@1761bc3

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants