bottlesdevs / Bottles

Run Windows software and games on Linux
https://usebottles.com
GNU General Public License v3.0
6.48k stars 276 forks source link

[Request]: Use Real Program Icon for the Program Window? #2985

Open Perkolator opened 1 year ago

Perkolator commented 1 year ago

Tell us the problem or your need

The running program window in the taskbar always show the Bottles icon, not the actual program icon.

bott

Describe the solution you'd like

Would it be possible to use the actual program icons for the windows?

Other solutions?

No response

Additional context and references

No response

PacBilly commented 1 year ago

Yeah, I second this request. If you use the non-Flatpak version of Bottles, it handles this properly and shows program icon, but with the Flatpak it shows the Bottles icon instead. Drives me crazy, but the flatpak version is less buggy in other regards, so it's the lesser of two evils, I guess. But even in the Bottles team's example .desktop entry YouTube video, you can see it's running the wrong icon. It needs to appear is though the app is running natively, as it does in the non-Flatpak version.

M0JXD commented 7 months ago

I would love this as well, especially given that the guide/docs heavily encourage the use of the Flatpak.

In the meantime, is there any way to set panel/taskbar icons manually in the Flatpak version? I now have multiple apps using Bottles and running them at the same time gets very confusing very quickly!

Ambient-Impact commented 6 months ago

I'd love to see this as well, but it looks like this a security restriction of Flatpak on Wayland; see flatpak/flatpak#4751, so not sure what Bottles can do here.

ParticleMon commented 4 months ago

In the OP, the DE is Cinnamon, which is likely on X11 since Cinnamon's Wayland support is still in Alpha.

But if this Flatpak security restriction is "working as designed, although the design is not ideal" (https://github.com/flatpak/flatpak/issues/4751#issuecomment-1041520941) and it also applies to X11, then might the providing of an AppImage be expedited, or at least a .deb?

jntesteves commented 1 month ago

I think this issue might get solved when desktop compositors implement this new (staging) Wayland protocol and Flatpak (and maybe Wine also) starts using it: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/269

Ambient-Impact commented 1 month ago

Interestingly, I switched to Nobara 40 which runs KDE Plasma 6 on Wayland, and apps launched from Bottles use their own icons rather than Bottles' icon, so I'm wondering if Plasma has already implemented xdg-toplevel-icon or has their own workarounds for this?

capi1O commented 1 week ago

I am using Bottles (2:51.15-1) without flatpack on Wayland/Gnome 47 and I still get a placeholder icon in the dash for bottled apps, even if a desktop entry was created from Bottle.

The fix is to add line StartupWMClass=file.exe in the .desktop file created by Bottles in ~/.local/share/applications.

The class name is simply the filename of the executable launched by Bottles (for instance notepad.exe), therefore this line could be added by Bottles upon desktop entry creation and this would solve this issue.

There is one catch though: if an app launches other executable(s), multiple desktop entries need to be created with the correct class (which can be found by running xprop WM_CLASS then click on the target window. For instance PDFgear starts with pdflauncher.exe and then another window with the PDF document opens but its WM class is different (pdfeditor.exe). Note: Add the line NoDisplay=true to the duplicate desktop entries so you have only one showing in your app launcher.

Edit: links to unity thread and wine commit that addressed the same issue (setting StartupWMClass on desktop entry creation): https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1103833 & https://gitlab.winehq.org/wine/wine/-/commit/917e86dd7a4cca1da47262caaded2bef9e022f99