Skip to content

silx.app.view: Fix Ubuntu taskbar icon by setting app.setDesktopFileName#4475

Merged
t20100 merged 3 commits into
mainfrom
4474-silx-icon-is-not-showing-up-in-ubuntu24-task-bar
May 4, 2026
Merged

silx.app.view: Fix Ubuntu taskbar icon by setting app.setDesktopFileName#4475
t20100 merged 3 commits into
mainfrom
4474-silx-icon-is-not-showing-up-in-ubuntu24-task-bar

Conversation

@poautran
Copy link
Copy Markdown
Contributor

@poautran poautran commented Feb 3, 2026

This helps desktop environments (notably Ubuntu/GNOME) match the running app window with the installed desktop entry, so the correct taskbar icon is used.

Should not impact any other distros.

@poautran poautran linked an issue Feb 3, 2026 that may be closed by this pull request
@poautran poautran requested a review from t20100 February 3, 2026 10:07
Comment thread src/silx/app/view/main.py Outdated
Comment thread src/silx/app/view/main.py Outdated

app = qt.QApplication([])
if hasattr(app, "setDesktopFileName"):
app.setDesktopFileName("org.silx.SilxView")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I miss something, this relies on what's in package/desktop to be installed on the host. So one must have installed silx as an Ubuntu package to have the icon... Did you tested on a computer without silx installed on the system?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, it does not work if we just pip install...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I tested/searched, there seems to be no neat solution to display the icon in the menu bar that only relies on the application code.

However this fix is needed even if it is not the only required step: It makes it work when the icon and .desktop file are already available on the host. So it is required to install the .desktop and icon another way.

@poautran poautran self-assigned this Mar 3, 2026
@t20100 t20100 force-pushed the 4474-silx-icon-is-not-showing-up-in-ubuntu24-task-bar branch from 19e68c8 to 32440aa Compare May 4, 2026 10:02
@t20100 t20100 enabled auto-merge May 4, 2026 10:03
@t20100 t20100 disabled auto-merge May 4, 2026 11:01
@t20100 t20100 merged commit 1af224c into main May 4, 2026
3 of 4 checks passed
@t20100 t20100 deleted the 4474-silx-icon-is-not-showing-up-in-ubuntu24-task-bar branch May 4, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Silx icon is not showing up in Ubuntu24 task bar

2 participants