Weird problem with win program

Questions about Wine on Linux
Locked
NoWhine
Newbie
Newbie
Posts: 1
Joined: Sun Nov 13, 2016 3:10 pm

Weird problem with win program

Post by NoWhine »

Hi, love Wine, new to Linux/Ubuntu and pleased that I can run stuff I normally need daily.

I have several program written for windows XP that all work fine when I access them directly and launch with a double-click using Wine.

I am using Alacarte (Main Menu) to create Dash links to the programs and they almost all work fine. One is giving me some trouble with a database not opening.

IF I navigate to the program folder and double click the win-program it all loads and opens the data file OK.

IF I use the link in Dash it fails to open the data file. The program looks for the data file in the home folder of the program.

Any thoughts on how to fix this? It might be that wine is not changing the home folder for the program before launching. If so, how can I fix that?

Thanks
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Weird problem with win program

Post by Bob Wya »

Hiya NoWhine

I would guess Alacarte will store the custom .desktop files in:

Code: Select all

"${HOME}/.local/share/applications"
But I don't use Ubuntu or Unity - so I can't be 100% sure!

I'd normally use find for this purpose:

Code: Select all

find "${HOME}/.local/share/applications" -name "*.desktop"
# replace * with something more specific - if you can!
(or grep):

Code: Select all

grep -R "<executable name>" "${HOME}/.local/share/applications"
# replace <executable name> with part (or all) of the executable name of your Windows application
You'd want to alter the problematic .desktop file.
As an example, here is my custom Steam (64-bit launcher) contents:

Code: Select all

[Desktop Entry]
Name=Steam64
Exec=env WINEPREFIX="/mnt/robs-rog-laptop/linux_shared/robert/wineprefixes/steam64" /usr/bin/wine C:\\\\windows\\\\command\\\\start.exe C\\:\\\\Program\\ Files\\ \\(x86\\)\\\\Steam\\\\Steam.exe -no-cef-sandbox
TryExec=/usr/bin/wine
Terminal=false
Type=Application
StartupNotify=true
Path=/mnt/robs-rog-laptop/linux_shared/robert/wineprefixes/steam64/dosdevices/c:/Program Files (x86)/Steam
Icon=wine_steam
Categories=X-Wine;Network;FileTransfer;Game;
  • So for Exec make sure you're using wine start to launch the application. This is like starting the application from within a explorer window - ensuring the working path is also passed on. The Exec line needs to have mad BASH escaping applied (see the example above)!! See BASH Hackers Wiki: Quotes and escaping for more information on this...
  • Set the Path variable to the path you require (don't escape this) - again see above.
Bob
Locked