AppImageKit icon indicating copy to clipboard operation
AppImageKit copied to clipboard

Set _NET_WM_ICON so that Dock shows correct icon

Open probonopd opened this issue 8 years ago • 5 comments

Currently, the dock only shows the correct icon if an AppImage is either launched through a desktop file and/or the application explicitly sets a window icon (e.g., using Qt) like this:

QFileInfo fi(app.applicationDirPath() + "/../share/pixmaps/qtquickapp.png");
QGuiApplication::setWindowIcon(QIcon(fi.absoluteFilePath()));

which seems to set the _NET_WM_ICON according to https://git.qt.io/consulting-usa/qtbase-xcb-rendering/commit/6131b909532f7bfdcbc8fa2f35f2c6f84c06547d.

Could we make the AppImage AppRun.c read the icon from the desktop file, and have it set the application's _NET_WM_ICON programmatically?

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=465109 may contain some source code that might do it.

probonopd avatar May 12 '18 20:05 probonopd

We could also hack around it by creating a temporary desktop file, and calling it with xdg-open.

TheAssassin avatar May 12 '18 21:05 TheAssassin

Yes, I wonder which is cleaner and produces less overhead...

probonopd avatar May 12 '18 21:05 probonopd

We could also hack around it by creating a temporary desktop file, and calling it with xdg-open.

If desktop files were smart enough to have the equivalent of $ORIGIN then we might just xdg-open the desktop file contained inside an app bundle (such as an AppDir or AppImage).

But the XDG Desktop Spec doesn't have this (yet?). Should we propose it?

probonopd avatar Oct 31 '22 20:10 probonopd

I mean, you can try... I don't think they would be completely objected to this.

TheAssassin avatar Nov 01 '22 12:11 TheAssassin

I submitted a patch to KDE, do AppImage maintainers think it makes sense?

https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2558

easyteacher avatar Jan 30 '23 09:01 easyteacher