Pages

Monday, September 3, 2012

How to add your console apps to the menu

I noticed while looking over app choices people make, that console apps get ignored a lot because there is no Unity, Gnome, XFCE or LXDE menu entry for them.

If you have to open terminal and remember what to type, people aren't interested in using them, it seems.

I did some digging a few years back and have been using Terminator as my terminal emulator.

One of the great features with Terminator is you can pass it complicated instructions.

I am going to show you how I made easy to use menu entries with Terminator and the menu entry program Alacarte.

One of the first menu entries I made was for the program IRSSI.

To do this I needed to make an entry using Alacarte.

In Alacarte, I first clicked on the category that I wanted my app to be in. In this case "Internet" seemed the best choice.

Then I clicked the "New Item" button. This button will have a + symbol next to it.

As the picture shows below, you then have to add the name of the item and the command.

Click this picture to enlarge it.

The name for this item is simple enough, since my command logged me directly into freenode with my nick and password, I call it Freenode.

I could just start IRSSI, in which I would call the item IRSSI. The name of the item is entirely up to you.

Once you give the item a name, you can change the icon if you wish by clicking on the current icon's picture. In the picture above, it is a road cone.

Here is where Terminator comes in handy. There are 2 options here. If I just wanted to start IRSSI from the menu item I am creating, i can use the command: terminator -e irssi.

But I want it to go to the server irc.freenode.org, and to log me in with my registered nick and password.

So here is where the second option for terminator is so useful. The command to do all of this is: terminator -x irssi --connect=irc.freenode.org --nick=(add your nick here) --password=(add you password)

The -x option (or flag, as some call it) for Terminator allows me to pass a complex command with it's options to Terminator.

Once I have put all of this in the "command" section and hit Ok button (not shown in the picture above because the item was already created) then I now have a menu entry in Unity, Gnome, XFCE or LXDE that will launch my terminal, run IRSSI, and log me into freenode with my registered nick and password.

All of that done by choosing the menu entry I created now, Instead of having to open the terminal and remember all of that off the top of my head or dig around for an automated script I made earlier.

I personally use this option to make MOC my media player, to open my gmail with links, and a few other things I wanted at my fingertips.

Thanks to Terminator, and this wonderful option, you can automate just about any console work you have.

And thanks to Alacarte, you can put that automation into a menu option for ease of use by yourself and those who use your system.

I hope you found this little tutorial I made useful. I use my Freenode menu entry and my MOC menu entry daily.