flathub / org.winehq.Wine

https://flathub.org/apps/details/org.winehq.Wine
35 stars 11 forks source link

No .desktop files #7

Open chaibronz opened 2 years ago

chaibronz commented 2 years ago

After installing a program with wine, you have to manually start it via the command line by typing 'flatpak run org.winehq.Wine (path to program)'. Wine does create a .desktop file but it doesn't seem to be recognized by start menus. It looks like the .desktop file uses program paths and prefixes associated with the non-flatpak wine. With that, .desktop files aren't recognized by default. Could this be fixed so that .desktop files use flatpak paths instead?

gasinvein commented 2 years ago

Sadly exporting .desktop files is not possible, at least not atm. flatpak/xdg-desktop-portal#696 will open up possibility for this, but even then it'll still require significant amount of work on Wine itself.

chaibronz commented 2 years ago

I guess on the bright side, most people probably don't run that many apps with Wine. I just use one and found it was easy enough to create a desktop entry. For anyone looking to do the same, here's a decent template:

name of file = program_name.desktop location of file = ~/.local/share/applications/ file components:

[Desktop Entry] Name=name of your program (note: whatever you put here is how it should appear in your menu) Exec=flatpak run org.winehq.Wine ~/.var/app/org.winehq.Wine/data/wine/path/to/your/program/.exe Type=Application StartupNotify=true (not sure if this line is needed) Icon=path/to/program/.ico (when i used the path to the icon file in the wine directory it didnt work, but if you move the icon to another directory (ie. ~/.local/share/icons/ or ~/.icons/) then use that path it should work.

It only takes a few mins to set up and then you're basically set. If you ever remove the program you'll also need to manually delete your .desktop file too, otherwise it will continue to show up in your menu, but not work.

Docmine17 commented 2 years ago

👀 https://docs.flatpak.org/en/latest/portal-api-reference.html#gdbus-org.freedesktop.portal.DynamicLauncher

tazihad commented 2 years ago

The only app I run from wine is microsoft office. Thought I could install Office from Bottles. But Bottles don't integrate well with desktop. Let's say open docx file with Office 2010. I hope this version of wine would work similar to installing bare metal.

fastrizwaan commented 1 year ago

winezgui frontend is for org.winehq.Wine and it handles desktop shortcuts . https://github.com/fastrizwaan/flatpak-wine