Gnome desktop file not working

Questions about Wine on Linux

amithielLevel 1
Posts: 6Joined: Tue Dec 14, 2010 1:37 pm
Hi guys,

I'm sorry coming here to ask a dumb question, but seriously...i'm going crazy with this one. I literally spent hours trying different combinations from all over the web.. nothing works.
Anyway, i'm using ubuntu 20.04 [gnome].
wine-5.8 [Staging]

I installed an app, and the default .desktop file didn't work, so i started to edit it until i got to this point:

Note: desktop-file-validate Mp3tag.desktop does not complain of anything anymore, i solved all the errors [ i think ]. But the app still does not open! the path is correct and it will open if i execute in terminal: wine /home/pkillpeers/.wine/dosdevices/c:/Mp3tag/Mp3tag.exe

Code: Select all

[Desktop Entry] Name=Mp3tag Exec=env WINEPREFIX=/home/pkillpeers/.wine wine /opt/wine-staging/bin/wine /Unix /home/pkillpeers/.wine/dosdevices/c:/Mp3tag/Mp3tag.exe Type=Application StartupNotify=true Path=/home/pkillpeers/.wine/dosdevices/c:/Mp3tag Icon=8F7D_MP3TAG.0 StartupWMClass=Mp3tag.exe
Adiddional info: The .desktop file is located at /home/pkillpeers/.local/share/applications/wine/Programs/Mp3tag
SInce i found it nowhere else, i'm guessing when i search in dash for mp3tag , i'm executing the right .desktop file, right?

Cheers

dimesioModerator
Posts: 13056Joined: Tue Mar 25, 2008 10:30 pm

Exec=env WINEPREFIX=/home/pkillpeers/.wine wine /opt/wine-staging/bin/wine /Unix /home/pkillpeers/.wine/dosdevices/c:/Mp3tag/Mp3tag.exe

That's wrong. First, your command line tells the system default wine to run /opt/wine-staging/bin/wine, which obviously can't be correct, and second, the /unix flag has to be used with wine start. Assuming the paths are correct, the command should be either

Code: Select all

Exec=env WINEPREFIX=/home/pkillpeers/.wine wine start /unix '/home/pkillpeers/.wine/dosdevices/c:/Mp3tag/Mp3tag.exe'
or

Code: Select all

Exec=env WINEPREFIX=/home/pkillpeers/.wine /opt/wine-staging/bin/wine start /unix '/home/pkillpeers/.wine/dosdevices/c:/Mp3tag/Mp3tag.exe'
depending on whether /opt/wine-staging/bin/wine is the system default version. Hint: if you installed winehq-staging, it is, and you can use the shorter command line.
amithielLevel 1
Posts: 6Joined: Tue Dec 14, 2010 1:37 pm
Hi,
thanks for replying.
in my case its the second option

Code: Select all

pkillpeers@Nix:~$ whereis wine wine: /usr/bin/wine /opt/wine-staging/bin/wine /usr/share/man/man1/wine.1
so i used:

Code: Select all

Exec=env WINEPREFIX=/home/pkillpeers/.wine /opt/wine-staging/bin/wine start /unix '/home/pkillpeers/.wine/dosdevices/c:/Mp3tag/Mp3tag.exe'
However its still not working. issuing the validate command:

Code: Select all

pkillpeers@Nix:~/.local/share/applications/wine/Programs/Mp3tag$ desktop-file-validate Mp3tag.desktop Mp3tag.desktop: error: value "env WINEPREFIX=/home/pkillpeers/.wine /opt/wine-staging/bin/wine start /unix '/home/pkillpeers/.wine/dosdevices/c:/Mp3tag/Mp3tag.exe'" for key "Exec" in group "Desktop Entry" contains a reserved character ''' outside of a quote Mp3tag.desktop: error: value "env WINEPREFIX=/home/pkillpeers/.wine /opt/wine-staging/bin/wine start /unix '/home/pkillpeers/.wine/dosdevices/c:/Mp3tag/Mp3tag.exe'" for key "Exec" in group "Desktop Entry" contains a reserved character ''' outside of a quote
Edit:

Issuing the command in terminal, works and the app opens... :

Code: Select all

env WINEPREFIX=/home/pkillpeers/.wine /opt/wine-staging/bin/wine start /unix "/home/pkillpeers/.wine/dosdevices/c:/Mp3tag/Mp3tag.exe"
why wouldn't work the desktop file...this is insane

Edit 2:

Of course, after rebooting, it now works. didn't think of the obvious. Somehow the desktop file was not getting updated or whatever.
thanks for the help

hwertzNewbie
Posts: 1Joined: Sat May 23, 2020 7:38 pm

Thank you for the info! I think this may be a recent bug [creating desktop entries -- and the ones in wine application menu -- with "wine /opt/wine-staging/bin/wine" instead of "/opt/wine-staging/bin/wine start"] like since staging 5.6 or 5.7. I just looked at my friend's setup and his tiger woods 99 .desktop file from Jan 1 has "/opt/wine-staging/bin/wine C:\\\\windows\\\\command\\\\start.exe", so it was generating a somewhat verbose [could just be "wine start" really] but functional desktop file with whatever wine-staging was current then. Don't know when it switched to effectively "wine wine" which does not work.

Off to edit a few .desktop files!
--Henry

Video liên quan

Chủ Đề