Ubuntu: Can't open script as application



Question:

I'm trying to install puush on my computer, everything works great until I run chmod +x.

After that, the script will still only open in gedit.

I read through similar questions on this site as well as others and have yet to get the script to execute. Any help would be great, ty.


Solution:1

  1. Make sure your script header contains #!/bin/bash.
  2. Right-click on your script and click on Properties. In the Permissions tab, make sureAllow executing file as program is checked.
  3. You should have dconf-editor installed:

    sudo apt-get install dconf-editor  
  4. Configure Nautilus to react on a double-click of a script:

    dconf-editor  
  5. Navigate in dconf-editor through the following items: org ➤ gnome ➤ nautilus ➤ preferences

  6. On executable-text-activation select launch from the drop-down menu. This will launch scripts as programs.

  7. Close dconf-editor.

  8. Run your script "as a program" double-clicking it!


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »