You are not logged in.

#1 2023-09-24 15:01:23

rafaellancas
Member
Registered: 2022-05-31
Posts: 86

[SOLVEDIs it possible to create desktop entries for wine applications?

So, here's my problem: I have a few windows games that I can open and use just fine inside Arch, but, for some unknown reason, I just can't make a desktop entry for them. If I put the "Path" option, it just gives me a "ch can't find directory bug", no matter what! I have one game installed through wine, MTG Arena and I tried to copy the model of the desktop entry but it just refuses to work no matter what. I couldn't find any useful information for this matter at:

https://wiki.archlinux.org/title/desktop_entries

For some reason, each line of the desktop entry file works by its own rules and there's nowhere on the internet to find information for them(I mean, into exec you can't use spaces, but in path you can, but in exec the space sometimes work with "\\", but most of the time don't, etc).

Here's the desktop entry for the game I'm trying to make work, and it opens just fine if I go into the directory and just open it manually. Seriously, how can a simple thing like a shortcut be so screwed in KDE?

Here's my desktop entry:

[Desktop Entry]
Name=Bloons TD6
Exec=env WINEPREFIX="/home/rafaellancas/.wine" wine "/mnt/data_ext/Games/[Windows]/Bloons TD6/BloonsTD6.exe"
Type=Application
StartupNotify=true
Comment=Tower Defense
Icon=
StartupWMClass=BloonsTD6.exe

Thanks in advance!

Last edited by rafaellancas (2023-09-24 15:37:05)

Offline

#2 2023-09-24 15:06:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,462
Website

Re: [SOLVEDIs it possible to create desktop entries for wine applications?

And... what happens when you run that with exo-open, dex, gtk-launch, or similar?  What is the output exactly?

Last edited by Trilby (2023-09-24 15:07:48)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-09-24 15:12:04

rafaellancas
Member
Registered: 2022-05-31
Posts: 86

Re: [SOLVEDIs it possible to create desktop entries for wine applications?

I don't know what these that you mentioned are, but it works fine if I just double click the app and select "execute" if that's what you meant...

Offline

#4 2023-09-24 15:17:59

JeanLucJ
Member
Registered: 2019-03-08
Posts: 59

Re: [SOLVEDIs it possible to create desktop entries for wine applications?

Hello,

Here is an example that works for me :

[Desktop Entry]
Name=PokerStars.fr
Exec=env WINEPREFIX="/home/jeanluc/.wine" wine C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start\\ Menu\\\\PokerStars.fr.lnk
Type=Application
StartupNotify=true
Path=/home/jeanluc/.wine/dosdevices/c:/Program Files (x86)/PokerStars.FR
Icon=2094_PokerStarsUninstall.0
StartupWMClass=pokerstarsupdate.exe

It's not the only way to do it, I have some with other means (like wine start), but this one feels the most straightforward to me.

Regards,

Offline

#5 2023-09-24 15:22:04

rafaellancas
Member
Registered: 2022-05-31
Posts: 86

Re: [SOLVEDIs it possible to create desktop entries for wine applications?

Thank you! The problem is that I didn't install the game through wine, I just want to open the executable through it, but, apparently, it's impossible to do it.
For what I figured out, wine creates some kind o "lnk" file for applications installed through it, and that's what it calls in the desktop entry

Exec=env WINEPREFIX="/home/jeanluc/.wine" wine C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start\\ Menu\\\\PokerStars.fr.lnk

Where "C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start\\ Menu\\\\PokerStars.fr.lnk" is a "lnk" file and not a "exe", I need to make a desktop entry for a "exe" to make this work.
But thank you anyway!

Offline

#6 2023-09-24 15:27:32

JeanLucJ
Member
Registered: 2019-03-08
Posts: 59

Re: [SOLVEDIs it possible to create desktop entries for wine applications?

I'm pretty sure you can make desktop applications for exe, did you try my syntax with an exe file?

Offline

#7 2023-09-24 15:36:14

rafaellancas
Member
Registered: 2022-05-31
Posts: 86

Re: [SOLVEDIs it possible to create desktop entries for wine applications?

Yeah, it doesn't work, but I found out that it's possible to make it work with

Exec=wine '/mnt/data_ext/Games/[Windows]/Bloons TD 6/BloonsTD6.exe'

In the end, the trick is to delete the "Path" option, since it's just too buggy to work and use wine and '' with the exe file. This problem is solved!

Offline

#8 2023-09-24 18:31:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,462
Website

Re: [SOLVEDIs it possible to create desktop entries for wine applications?

rafaellancas wrote:

I don't know what these that you mentioned are

They are tools to launch / run a desktop file so you could see what errors were produced to post them here.  The only way to get real help is to post the actual commands and errors.

rafaellancas wrote:

but it works fine if I just double click the app and select "execute" if that's what you meant...

Obviously it wasn't working fine, or you'd not post here.  But when you attempt to launch a desktop file that way, there's no way to see what the error actually was if / when it doesn't work.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB