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

[Desktop Entry]
Comment=JMRI DecoderPro

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.

  • 1
    Did you try to make it executable? chmod +x ~/Desktop/DecoderPro.desktop
    – jake
    Commented Jul 15, 2019 at 11:59
  • Yes. Didn't help.
    – Pygmalion
    Commented Jul 15, 2019 at 12:20
  • @jake Maybe this will help. /home/pi/JMRI/DecoderPro is also a script that starts with #! /bin/bash. It is also +x.
    – Pygmalion
    Commented Jul 15, 2019 at 16:09
  • @Pygmalion, And if the problem came from the line: Comment = JMRI DecoderPro, DecoderPro is also after this space ... try:Comment = "JMRI DecoderPro"maybe?
    – Ephemeral
    Commented Jul 15, 2019 at 16:44
  • 1
    For other noobs like me, found the solution raspberrypi.org/forums/viewtopic.php?t=248380#p1516491
    – hbm
    Commented Oct 4, 2019 at 20:58

2 Answers 2


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

[Desktop Entry]
Comment=The official
Exec=bash test

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

echo hello world

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.

  • OK, this works for me. It is not on the desktop screen though...
    – Pygmalion
    Commented Jul 15, 2019 at 20:04
  • @Pygmalion, yes no icon on desktop. I would read more about this later and update my answer if needed. You have 3 tools starting with desktop-file-edit , desktop-file-verify and desktop-file-install , when I use edit tool, nothing is done.
    – Ephemeral
    Commented Jul 15, 2019 at 20:06
  • Actually when I used desktop-file-install, there was error because of using semicolon. It seems that semicolon after Terminal=false is also a problem. Original question is about icon on the desktop screen, so I would appreciate if you find the solution in that way.
    – Pygmalion
    Commented Jul 15, 2019 at 20:09
  • @Pygmalion, Yes indeed my answer is not really correct but it is an approach that works and that will surely help me to understand the future. I am currently looking for the desktop.
    – Ephemeral
    Commented Jul 15, 2019 at 20:11
  • @Pygmalion, it's ok after some hours , it's just a checkbox to uncheck, ho !
    – Ephemeral
    Commented Jul 15, 2019 at 22:12

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

  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Oct 13, 2022 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.