SSHMenu 3.18 adds command-line support
Since the last release of SSHMenu went so smoothly, I thought I might as well do another...
SSHMenu is somewhat of an enigma - it's a GUI tool for people who work at the command-line. In theory it shouldn't appeal to the point-and-click crowd (since they don't use command-lines) and it also shouldn't appeal to the command-line crowd (since they don't use GUIs). Of course the world is not black and white and most people choose the combination of tools that work best for them.
I lean strongly towards the command-line myself and yet I developed SSHMenu because I wanted a GUI solution to a particular problem. I wanted to be able to easily initiate a new SSH connection in a new terminal window. I wanted the ability to define the position and size of the new window and to use colours to indicate the class of machine the window was connected to (eg: production vs test vs development). The solution that worked for me was to implement an applet that provides a menu of frequently used connections.
It turns out that there are some people who also want to be able to set up profiles for frequently used connections, but they don't want to use a menu. When they're typing at a command prompt and want a new SSH window, they don't want to reach for the mouse - they'd prefer to type a command. Release 3.18 of SSHMenu adds a feature to support this group of users. Now they can use SSHMenu's GUI dialog for the infrequent task of defining a new connection, but for the frequent task of initiating a connection they can use the command-line.
Here's an example. Say you have a server called 'fitzy' that hosts your web development environment. Perhaps you frequently connect to this host to run 'tail' against the Apache error log. Since the lines of output tend to be quite long you prefer to use a small font and a wide window positioned across the the bottom of your screen. You can set that all up using SSHMenu's 'Host' dialog:
And now you can initiate the connection in a new window with this command:
sshmenu-gnome fitzy
Of course 'sshmenu-gnome' is rather a long and unweildy command to type frequently so it's likely that you'd alias it to something shorter like 'connect' or 'sshm'. The SSHMenu distribution includes a bash completion function called _sshmenu which allows you to do tab completion of host definition titles from the command line. If you set up an alias for the main command, you'll want to associate the completion function with your alias as well:
alias sshm=sshmenu-gnome
complete -F _sshmenu sshm
So there you go. If you like to use multiple terminal windows it might be a useful addition to your toolbox.
Comments