I want to create a file, which will execute a code in terminal when dbl clicked.. Can this be done? If Yes, How?
Asked
Active
Viewed 171 times
1 Answers
-1
Yes, you will need to create a file ending with a .sh file extension. put #!/bin/bash on the first line by itself.
Then enter your terminal code.
You will need to right-click on the file, choose properties, go to the permissions tab, and check the box to allow executing the file.
You may need to open nautilus and go to edit > preferences > behavior and choose run executable text files when they are opened, or ask each time.
You can right-click on the file to make a link, and choose make link. Double-clicking on the file that is generated will execute the code.
contributor1
- 132