11

I have created file /home/pi/Desktop/DecoderPro.desktop with the contents

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=DecoderPro
Comment=JMRI DecoderPro
Icon=/home/pi/JMRI/resources/dp3_48x48.gif
Exec=/home/pi/JMRI/DecoderPro
Terminal=false;

Each time I click the icon on the desktop I get the message:

This text file 'DecoderPro' seems to be an executable script. what do you want to do with it "desktop entry"?

Is it possible to make this desktop shortcut to start automatically, without the message?

EDIT: It seems that /home/pi/JMRI/DecoderPro is the source of the problem. It is also script starting with #! /bin/bash. But it is also +x.

Currently I have buster 10 version and if I remember right, in previous version of Raspbian this worked.

Pygmalion
  • 458
  • 2
  • 7
  • 25

2 Answers2

9

Create a file /home/pi/Desktop/test.desktop:

[Desktop Entry]
Version=1.1
Name=test
Comment=The official
Icon=emblem-debian
Type=Application
Path=/home/pi
Exec=bash test
Terminal=true

bash script named test (UTF-8) in /home/pi dir:

echo hello world
read

adjust permissions:

chmod u+x /home/pi/test

Then open: ~$ pcmanfm go to Edit/Preferences/General, Check box for "Don't ask options on launch executable file" ref

Edit: Terminal must be true if you want to see the output of your script.

Tested on fresh Raspbian Buster install.

Jeff Puckett
  • 103
  • 4
Ephemeral
  • 2,167
  • 1
  • 8
  • 19
0

thank for helping me out, you are my savior. I did follow your step

  1. Hit the terminal icon, then it will appear some thing like this "user@rasperipy: ~$"

  2. type in the command "pcmanfm" + enter

  3. There will be a window show up, n you guys follow his guide (go to Edit/Preferences/General, Check box for "Don't ask options on launch executable file)

  4. It should have a check box there which is empty, n you need to checked it

Excuse my typo <3