I have created a shell script on Desktop. Whenever I open it , I get a prompt to either run in terminal, display and etc. How to remove this prompt?

  • What desktop environment are you using? – casey Mar 8 '14 at 18:47
  • @casey Cinnamon – pRoSpEr Mar 8 '14 at 18:48

To run your script without having that dialog appear create a .desktop file for it:

[Desktop Entry]
Name=My script
Comment="Whatever you want to see when you hover the mouse over the icon"

Save the file on your Desktop folder as myscript.desktop, and make it executable:

chmod a+x ~/Desktop/myscript.desktop

It should now appear using the icon /home/user/myicon.gif and you can run it by double clicking.

  • Can you suggest a script for testing above mentioned? I am trying some echo script , the result of which I cant see. In windows running a batch file with echo displayed the text in a pop up box. Can this be done in linux? – pRoSpEr Mar 8 '14 at 19:13
  • @pRoSpEr if you want this to be run in a terminal, change Terminal=false to Terminal=true. Otherwise, to test it, just change Exec to any graphical application. For example Exec=/usr/bin/xclock. – terdon Mar 8 '14 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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