10

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.

12
  • 1
    Did you try to make it executable? chmod +x ~/Desktop/DecoderPro.desktop
    – jake
    Jul 15, 2019 at 11:59
  • Yes. Didn't help.
    – Pygmalion
    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
    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
    Jul 15, 2019 at 16:44
  • 1
    For other noobs like me, found the solution raspberrypi.org/forums/viewtopic.php?t=248380#p1516491
    – hbm
    Oct 4, 2019 at 20:58

2 Answers 2

8

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.

7
  • OK, this works for me. It is not on the desktop screen though...
    – Pygmalion
    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
    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
    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
    Jul 15, 2019 at 20:11
  • @Pygmalion, it's ok after some hours , it's just a checkbox to uncheck, ho !
    – Ephemeral
    Jul 15, 2019 at 22:12
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

1
  • 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
    Oct 13, 2022 at 20:53

Your Answer

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

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