Shortcut to an .exe file does not work

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
taith
Level 1
Level 1
Posts: 31
Joined: Mon Feb 20, 2017 8:13 am

Shortcut to an .exe file does not work

Post by taith » Fri Sep 15, 2017 6:46 pm

System used: Linux Mint 18.1 Cinnamon 64-bit
I do have game opened in wine, and wanted to have shortcut to it on my desktop.
Used Ctrl+M to create shortcut to main executable file, game runs no problem on wine, however shortcut (even in original folder) returns me message:

Code: Select all

Data folder not found
There should be 'Shortcut to Interplanetary_Data'
folder next to the executable
Interestingly enough, after changing shortcut name to "Interplanetary" from "Shortcut to Interplanetary" it started to work.
However after moving icon from the folder to desktop error occurred again, but this time I have no idea how to fix it.

Code: Select all

Data folder not found
There should be 'Interplanetary_Data'
folder next to the executable

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Shortcut to an .exe file does not work

Post by mrmajik45 » Fri Sep 15, 2017 7:24 pm

You took the game out of the folder. It NEEDS to be in the folder that's how it finds the files.
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

Mute Ant
Level 14
Level 14
Posts: 5135
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Shortcut to an .exe file does not work

Post by Mute Ant » Fri Sep 15, 2017 7:54 pm

You can work this using a 'wrapper' script with the location of the Windows program hard-coded. Then you make a desktop shortcut to the wrapper instead of directly to the exe.

Code: Select all

#!/bin/bash
dir="/opt/raging-mole/rtc/"
exe="rtc.exe"
pushd "$dir"
wine "$exe"
popd
exit $?
### ### ###
You need to set the script as 'executable' too.
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".

hpmc13
Level 3
Level 3
Posts: 148
Joined: Tue Jun 04, 2013 4:26 pm

Re: Shortcut to an .exe file does not work

Post by hpmc13 » Fri Sep 15, 2017 10:07 pm

Is there a shortcut to it in your main menu (the Start menu? What do we call it in Mint?) If so, Right-click on it and add it to your desktop.
If not, find the .exe in Nemo, Right-Click, chose "Make Link", then drag that new file to your desktop.
Running LM 19 Cinnamon

taith
Level 1
Level 1
Posts: 31
Joined: Mon Feb 20, 2017 8:13 am

Re: Shortcut to an .exe file does not work

Post by taith » Sat Sep 16, 2017 3:39 am

hpmc13 wrote:Is there a shortcut to it in your main menu (the Start menu? What do we call it in Mint?) If so, Right-click on it and add it to your desktop.
If not, find the .exe in Nemo, Right-Click, chose "Make Link", then drag that new file to your desktop.
This game works without installation, thus not having desktop icon with fancy graphics of that .exe

@mrmajik45 Read closely, all files are in folder, only shortcut, made by linux system does not work
Mute Ant wrote:You can work this using a 'wrapper' script with the location of the Windows program hard-coded. Then you make a desktop shortcut to the wrapper instead of directly to the exe.

Code: Select all

#!/bin/bash
dir="/opt/raging-mole/rtc/"
exe="rtc.exe"
pushd "$dir"
wine "$exe"
popd
exit $?
### ### ###
You need to set the script as 'executable' too.
Never played around with wrappers would you like to explain little bit more? code needs my modifications for directories?, is that common shortcut issue? maybe it's worth reporting it to someone to get it fixed in later releases?

Mute Ant
Level 14
Level 14
Posts: 5135
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Shortcut to an .exe file does not work

Post by Mute Ant » Sat Sep 16, 2017 8:59 am

"get it fixed" There's nothing to fix. Clicking a symbolic link (aka shortcut) is like executing it from a console command. The program starts with the Working Directory set to the folder holding the link, not the folder holding the program. That's how GNU-Linux works, built in.

You might get better results using a Program Launcher, instead of a symbolic link, but I don't know Cinnamon well enough to be sure.
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".

taith
Level 1
Level 1
Posts: 31
Joined: Mon Feb 20, 2017 8:13 am

Re: Shortcut to an .exe file does not work

Post by taith » Sat Sep 16, 2017 10:43 am

How should launcher command line look like? simple linking to .exe does not work.
Also even if it works "as intended" it still is rather inconvenient as it is useless in current form, at least for me. As problem does appear simple yet there are no easy solutions.

Mute Ant
Level 14
Level 14
Posts: 5135
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Shortcut to an .exe file does not work

Post by Mute Ant » Sat Sep 16, 2017 11:21 am

The folder /usr/share/applications/ is stuffed full with launchers. Generically...
o The real file name ends in .desktop
o The File Manager shows you the "Icon" and "Name" tags instead of the real file name.
o They are in plain text...
[Desktop Entry]
Name=Mono Runtime (Terminal)
Exec=mono
Terminal=true
Type=Application
Icon=mono-runtime-common
MimeType=application/x-ms-dos-executable;
NoDisplay=true
A Mint installation of Wine usually includes an entry in the main menu for 'Notepad'. You might copy that to the desktop and try editing it to point to your Windows program instead. Right-click over it and choose 'Properties' maybe, or open it in a text editor like leafpad or geany.
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".

Post Reply

Return to “Newbie Questions”