Shortcut to an .exe file does not work

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
taith
Level 2
Level 2
Posts: 50
Joined: Mon Feb 20, 2017 8:13 am

Shortcut to an .exe file does not work

Post by taith »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mrmajik45

Re: Shortcut to an .exe file does not work

Post by mrmajik45 »

You took the game out of the folder. It NEEDS to be in the folder that's how it finds the files.
Mute Ant

Re: Shortcut to an .exe file does not work

Post by Mute Ant »

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.
hpmc13
Level 3
Level 3
Posts: 166
Joined: Tue Jun 04, 2013 4:26 pm

Re: Shortcut to an .exe file does not work

Post by hpmc13 »

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 20 Cinnamon
taith
Level 2
Level 2
Posts: 50
Joined: Mon Feb 20, 2017 8:13 am

Re: Shortcut to an .exe file does not work

Post by taith »

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

Re: Shortcut to an .exe file does not work

Post by Mute Ant »

"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.
taith
Level 2
Level 2
Posts: 50
Joined: Mon Feb 20, 2017 8:13 am

Re: Shortcut to an .exe file does not work

Post by taith »

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

Re: Shortcut to an .exe file does not work

Post by Mute Ant »

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.
Locked

Return to “Beginner Questions”