WriteBash - In this article, I will guide you to add scripts to the Start menu of Linux Mint. You can do the same for Ubuntu or other operating systems (depending on the OS).
With the previous posts, you already have 2 scripts. A script used to create tunnels and a script used to delete tunnels.
Now we will add it to an item in the Start menu to easily call the program.
Choose where to place scripts and grant execution permission
There is one thing you need to do first, which is to choose where to put the scripts we wrote earlier.
For example, I will put it in the
danie@linuxmint /home/danie/ssh-tunnel $ ls -al total 16 drwxr-xr-x 2 danie danie 4096 Apr 23 15:44 . drwxr-xr-x 6 danie danie 4096 Mar 29 13:42 .. -rw-r--r-- 1 danie danie 984 Apr 23 15:44 kill-tunnel.sh -rw-r--r-- 1 danie danie 1035 Mar 23 22:55 tunnel-info.sh
Next, we will grant execution permission for these scripts. This is necessary to be able to call it from the Start menu.
danie@linuxmint ~/Desktop/blog/writebash.com $ chmod 700 *.sh danie@linuxmint ~/Desktop/blog/writebash.com $ ls -al total 16 drwxr-xr-x 2 danie danie 4096 Apr 23 15:44 . drwxr-xr-x 6 danie danie 4096 Mar 29 13:42 .. -rwx------ 1 danie danie 984 Apr 23 15:44 kill-tunnel.sh -rwx------ 1 danie danie 1035 Mar 23 22:55 tunnel-info.sh
Notice that the execution permission have changed from
Add scripts to the Start menu
I have written a detailed tutorial on how to add an item in the Start menu of Linux Mint. It is applicable for both Mint 17, 18 and 19. You can read the article below.
Recommended Reading: How to add a menu item in Linux Mint
You only need to set the item as images below.
Item for the menu create ssh tunnel.
- Name: SSH Tunnel
- Command: /home/danie/ssh-tunnel/tunnel-info.sh
- Comment: Anything you want
And the item for the menu delete ssh tunnel.
- Name: Kill SSH Tunnel
- Command: /home/danie/ssh-tunnel/kill-tunnel.sh
- Comment: Anything you want
Check the result
Now try opening the start menu and clicking on the ssh tunnel creation program. Click on any item in the list.
Here, basically the your ssh tunnel program is complete. You already have a GUI program written in bash script. It is quite simple and easy to write code with Zenity.
Use your idea to create other GUI programs from the bash script as you wish. That is unlimited, this is just a simple practical example for your reference.If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.
If you appreciate what we share in this blog, you can support us by:
- Stay connected to: Facebook | Twitter | Google Plus | YouTube
- Subscribe email to recieve new posts from us: Sign up now.
- Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
- Become a Supporter - Make a contribution via PayPal.
- Support us by purchasing Ribbon Lite Child theme being using on this website.
We are thankful for your support.