Google Ads

December 18, 2014

Run executable files on Ubuntu Linux

Introduction

Ubuntu by default uses the gnome file manager. And by default the Ubuntu file manager gives you options to either open a file or execute a file. There are basically two kinds of files on Linux which are executable; Binary files and Script files. To run these files, first you have to make them executable by setting the necessary file permissions and second you have to run them from file manager or terminal or any other third party applications.


Now lets go through the process of running a executable file by Ubuntu file manager.


I have downloaded Maniadrive; a free game from http://maniadrive.raydium.org/
to my Home folder. After extracting the downloaded file and going into the newly extracted folder, I find two files where both file names end with .sh. The sh files are shell script files which can be opened with a text editor as well as can be run. So, to run the game I have to run the mania_drive.sh file.

extracted ManiaDrive folder

First, I make sure the mania_drive.sh file is executable by setting the executable permission. To do that I right click on the file and select Properties from the menu. When the Properties window shows up, I go to the permissions tab and make sure Allow executing file as program is ticked.

file properties window

Now that, I have set the file permission to executable, I can run the file either from the terminal or from the file manager.


To run the file from the Ubuntu file manager, first I have to check the file manager's settings. From the file manager, I go to edit menu and then select Preferences. This will bring up Files Preference Window. I select the Behaviour tab and tick Run executable text files when they are opened. Now, I can run the mania_drive.sh file by just double clicking it!


File manager Preferences window

No comments:

Post a Comment