This question already has an answer here:
- How do I run executable scripts in Nautilus? 12 answers
- Run executable file on terminal 1 answer
- How do I use 'chmod' on an NTFS (or FAT32) partition? 10 answers
After reading an answer on how to make a file run a command in the terminal when ran, I tried to do it myself.
I made a new document, entered the following and saved.
#! /bin/bash echo "this is a test"
I then went to
Right-Click > Properties > Permissions and checked "Allow executing file as program."
However, when I double-click the document, it simply opens in my text editor (which I believe is gedit). In the right-click menu I see no options for running the file in the terminal.
I've tried doing this with other files as well. For instance, I installed WINE and tried to install a Window's program. WINE said to simply run the installer, but nothing would happen when I tried. I marked it to run as a program and still it wouldn't work. I could only install it by
Right-Click > OpenWith and selecting WINE.
Strangely enough, I copied my Keepass-2.28 Portable folder from my Windows partition to my Ubuntu partition and tried running the executable. Keepass fired right up, even though I hadn't marked that file to run as a program. I have Keepass 2.25 from the repository installed on my system if that makes a difference.
I've been running Ubuntu 14.04 in a dual-boot setup for several weeks. The only thing I can fathom I did that would mess this up is I used Synaptic Package Manager to remove a package from
KDE Desktop Environment in an attempt to uninstall an alternate desktop environment I installed via the terminal. I don't remember what the package was, but the only package in that category right now is
appmenu-qt5. As far as I can tell, removing that package has affected nothing, and I'm pretty sure I had issues with running files as programs since I got my Ubuntu.
EDIT: I have checked, and I don't think this question is a duplicate of this question. My Ubuntu is on a ext4 partition, and it's from there I'm trying to run programs. I also haven't dealt with trying to change permissions via the terminal or anything like that, I'm just trying to make the program run when I check the option in the properties menu. Please correct me if I'm wrong or missing anything.