0

I'm trying to create a launcher (shortcut) for winetricks (among other things wine-related) in xfce with my specific prefix.

In "command" part I have tried putting the following:

WINEPREFIX=~/.wineGames winetricks

WINEPREFIX='$HOME/.wineGames' winetricks

WINEPREFIX="$HOME/.wineGames" winetricks

WINEPREFIX=/home/myusername/.wineGames winetricks

WINEPREFIX="/home/myusername/.wineGames" winetricks

Any of these ends with error (or variant of):

"Failed to execute command "WINEPREFIX=~/.wineGames winetricks". Failed to execute child process "WINEPREFIX=~/.wineGames" (No such file or directory)"

I have to note that the first command absolutely DOES work, and works correctly when launcher from terminal. What am I doing wrong?

1 Answers1

0

I suspect from the error message that your desktop launcher is not passing the command to a shell, but simply splitting it into tokens and passing them to execlp() or similar. Since WINEPREFIX=~/.wineGames isn't an executable file, that fails.

You probably need to launch a shell to process the command line, using a command that is some variant of this:

 sh -c "WINEPREFIX=~/.wineGames winetricks"

Depending on the environment, you may also have to use a full path instead of ~

Kevin Boone
  • 4,092
  • 1
  • 11
  • 15
  • Thank you, works great. Just a heads-up, I tried copy pasting it and it failed initially because of the space at the beginning ( " sh" ). –  Oct 16 '17 at 17:38