evilsocket / evilsocket/opensnitch
[Bug Report] System tray icon is invisible / transparent on KDE Plasma 6 (Wayland) with PyQt6
- Dominant language
- Python
- Stars
- 14.1k
- Forks
- 665
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug:
On KDE Plasma 6 running a native Wayland session, the opensnitch-ui system tray icon is completely invisible/transparent. The tray item area itself exists and is fully interactive (right-clicking the invisible spot opens the context menu normally), but the icon pixmap is never rendered on the panel.
Include the following information:
- OpenSnitch version: 1.7.2
- OS: CachyOS Linux
- OS version: Rolling
- Window Manager: KDE Plasma 6 (KWin Wayland)
- Kernel version: 7.2.3-1-cachyos
- Python / PyQt: Python 3.14 / PyQt6
### To Reproduce:
Steps to reproduce the behavior:
1. Log into a KDE Plasma 6 Wayland session on CachyOS.
2. Launch opensnitch-ui.
3. Look at the system tray panel.
4. See error: The icon slot exists and can be clicked to display the context menu, but no visual icon is rendered (transparent space).
### Post error logs:
No crash errors are logged. The GUI process runs with an active PID, but Qt Wayland fails to render a visible icon surface through the Plasma StatusNotifierItem D-Bus interface.
### Expected behavior (optional):
The tray icon should be visually rendered on the KDE Plasma panel.
### Screenshots:
### Additional context:
The issue originates in opensnitch/service.py under _setup_icons():
1. Calling addPixmap(..., QtGui.QIcon.Normal, QtGui.QIcon.Off) defines only the inactive/off state. Under Plasma 6 (Wayland), the compositor queries the default representation via D-Bus; without it, it draws an empty surface.
2. Passing .svg directly into QtGui.QPixmap() without using QIcon can result in a null pixmap depending on the Qt6 image format plugins available at runtime.
Tested Workaround / Fix:
Instantiating QtGui.QIcon directly with the .png paths immediately solves the problem:
def _setup_icons(self):
self.off_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-off.png"))
self.white_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-white.png"))
self.red_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-red.png"))
self.pause_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-pause.png"))
self.alert_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-alert.png"))
self._app.setWindowIcon(self.white_icon)
if hasattr(self._app, "setDesktopFileName"):
self._app.setDesktopFileName(self.DESKTOP_FILENAME)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in opensnitch/service.py at _setup_icons() and review how the tray icons are created and assigned to the application. Launch opensnitch-ui in a KDE Plasma 6 Wayland session to verify the tray icon is visible and remains usable across its displayed states; the issue is done when the transparent tray area shows the expected icon.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100