1

I have some shell scripts (files *.sh) on my Ubuntu desktop, eg. startdoublecmd.sh or startlazarus.sh.

When using Ubuntu 20, those scripts started automatically upon double clicking on them. Now I upgraded to Ubuntu 22 and the scripts open in a text editor instead, and to run them I have to right click and select Run as Program from context menu.

I did not change any configuration, I just upgraded to 22 LTS. How to restore the Ubuntu 20 behavior on Ubuntu 22?

tk_
  • 121
  • 4

1 Answers1

1

Finally found solution myself according to the 8th or 9th answer here How can I create launchers on my desktop?.

Eg. for the Double Commander script, I created a file named doublecmd.desktop and copied it to my Desktop folder:

[Desktop Entry]
Encoding=UTF-8
Name=Double Commander
Comment=Run Double Commander
Exec=/home/user/doublecmd/startdoublecmd.sh
Icon=/home/user/doublecmd/pixmaps/mainicon/alt/128px-dcfinal.png
Terminal=false
Type=Application
Categories=Utility;

Then I had to right click on that file (invoke context menu) and select Properties and there I had to check Allow to run file as program.

Then I had to right click on that file once again and select Allow launching.

Pretty horrible way compared to Windows way where you just invoke context menu and click Send to desktop (create link)...

tk_
  • 121
  • 4