Add scripts to the Start menu of Linux Mint

Share this post to your friends !

This entry is part 4 of 4 in the series Build SSH tunnel app with Zenity
Add scripts to the Start menu of Linux Mint
5 (100%) 1 vote[s]

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 /home/danie/ssh-tunnel directory.

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 -rw- to -rwx.

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.

You only need to set the item as images below.

Item for the menu create ssh tunnel.

add-scripts-to-the-start-menu-of-linux-mint-01 Add scripts to the Start menu of Linux Mint
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.

add-scripts-to-the-start-menu-of-linux-mint-02 Add scripts to the Start menu of Linux Mint
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.

add-scripts-to-the-start-menu-of-linux-mint-03 Add scripts to the Start menu of Linux Mint
Click to start SSH Tunnel program.

Conclusion

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.

Continue reading the series«« Previous part: Create script file to delete ssh tunnel
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.


Share this post to your friends !
If you appreciate what we share in this blog, you can support us by:
  1. Stay connected to: Facebook | Twitter | Google Plus | YouTube
  2. Subscribe email to recieve new posts from us: Sign up now.
  3. Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
  4. Become a Supporter - Make a contribution via PayPal.
  5. Support us by purchasing Ribbon Lite Child theme being using on this website.

We are thankful for your support.

single post bottom banner
««

Got something to say? Join the discussion

Please keep in mind that all comments are subject to our Comment Policy. Your email address will not be published.
This site uses Akismet to reduce spam. Learn how your comment data is processed.