Trouble getting program started via menu item

Questions about Wine on Linux
Locked
thethinker
Level 1
Level 1
Posts: 9
Joined: Fri Dec 11, 2009 1:27 am

Trouble getting program started via menu item

Post by thethinker »

Hello all, I've got Peranso (new App for the database) humming along on my Xubuntu 20.04 machine running wine 6.0.1. However, I cannot get it started via a Menu Item. The exact command I'm using to start Peranso is:

Code: Select all

env WINEPREFIX=$HOME/.peranso_32bit wine $HOME/.peranso_32bit/drive_c/Program\ Files/Peranso/Peranso.exe
My Peranso.destop file is:

Code: Select all

[Desktop Entry]
Version=1.1
Type=Application
Name=Peranso
Icon=712F_Peranso.0
Exec=env WINEPREFIX=$HOME/.peranso_32bit wine $HOME/.peranso_32bit/drive_c/Program\\ Files/Peranso/Peranso.exe
Path=
Terminal=true
Actions=
Categories=wine-Programs;
StartupNotify=true
StartupWMClass=peranso.exe
The Path= was previously set, but I removed it, same behavior. It just doesn't start, and with no terminal I have no error messages to debug. Any suggestions?
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: Trouble getting program started via menu item

Post by jkfloris »

In a nutshell: you can't use the $HOME variable in a .desktop file.

Online you can find ways to use the $HOME variable, but that's a question that doesn't really belong to Wine.
Perhaps something like:

Code: Select all

Exec=/bin/sh -c "WINEPREFIX=$HOME/.peranso_32bit wine $HOME/.peranso_32bit/drive_c/Program\ Files/Peranso/Peranso.exe"
But maybe it's easier to use the full path, or move the program (wineprefix) to a place like /usr/local
thethinker
Level 1
Level 1
Posts: 9
Joined: Fri Dec 11, 2009 1:27 am

Re: Trouble getting program started via menu item

Post by thethinker »

Perfect! Thanks for the easy fix.

(I guess moving the prefix is "best" in some way, but KISS, I just used the full path.)
Locked