We should type ./file.sh in terminal to run sh. Is there way to run it as executable file by double click ?
Asked
Active
Viewed 5,415 times
2 Answers
6
Note: The question was edited to add "Xubuntu" after this answer was posted. This answer refers to plain Ubuntu Desktop 18.04.
You did not tell us, so I assume that you are running Ubuntu Desktop 18.04. By default, the file manager will not allow running scripts by double clicking them. To change this behavior:
Open the file manager.
Click on the "Files" label on the top-left of the screen. A menu will drop down.
Click "Preferences". A tabbed dialog box will be displayed.
Select the "Behavior" tab.
Choose your preferred behavior for "executable text files" aka scripts.
AlexP
- 10,435
0
You need to right click on it and tick the box permitting it to be an executable. Then you can simply double click, you will get a pop up asking whether to execute it or not.
Rattle
- 175
- 2
- 14
