SSHplus: Even better sshmenu compatible appindicator

SSHplus Appindicator
SSHplus Appindicator

My previous little utility – sshlist – got quite some attention, and helped out a lot of folks who were missing sshmenu on Unity. You can read more about the intentions behind this utility in this entry. Benjamin Heil further modified it giving it a simple parsable configuration format, and supporting launching applications.

SSHplus builds on both of the above, adding one the most requested features : supporting sshmenu configuration. SSHplus adds simple identification of sshmenu configuration – it grabs the title, and ssh parameters and sets them up in the menu (as shown in screenshot). It does not yet recognize  other items like profile etc. If you need an entry with very specific formatting, you can simply add the right arguments in sshplus configuration.

Features

  • Launch SSH, rdesktop, etc.
  • Compatible with sshmenu configuration file
  • Launch any application – for ex. VLC hangs a lot on me, and I need a simple way to kill it (screenshot)
  • Supports nested folders (but not yet for sshmenu nested entries – coming soon)

Setting up SSHplus

  • Download the latest sshplus.py  file from the github repo.
  • Copy file  to /usr/local/bin
  • Edit file .sshplus in home directory using simple configuration (explained below).
  • Launch sshlist.py
  • Or better yet, add it to gnome startup programs list so it’s run on login.

Example Configuration  ~/.sshplus

# Application launchers in a folder
folder:Applications
Show top|gnome-terminal|-x top
Kill VLC|pkill| -9 vlc

#back to main folder
folder:
#sep adds a separator
sep

# label: adds labels to the menu
label:SSH connections

SSH server1|gnome-terminal|-x ssh root@google.com
SSH server2|gnome-terminal|-x ssh -p 456 server2
Find the source|gnome-terminal|-x ssh neo@theone.com

sep

# Use rdesktop to connect to Windows Servers
label:RDesktop connections
Win-Server 1|rdesktop|-T “Win-Server 1″ 1.2.3.4
Win-Server 3 (with many arguments)|rdesktop|-g 1320×680 -T “Win-Server 3″ -x l -P -r sound:local 1.2.3.6

sep
label:Putty Connections

# PuTTY
PuTTY-Session 1|putty|-load SavedSession1
PuTTY-Session 2|putty|-load SavedSession2

#If present SSHmenu connections will be automatically added

Thanks to the users and commenters on sshlist who provided feedback, and to Benjamin Heil and Fabio for their modifications. Feel free to fork the project on github.

27 thoughts on “SSHplus: Even better sshmenu compatible appindicator”

  1. Hey.. thanks A LOT for this. I’d be great if you could add the possibility to nest the entries. People with more than 10 connections will thank you ;)

  2. Hello,
    Great appindicator, but it has a small problem, it does not import the ssh hosts from the folders of sshmenu.
    Could you add this feature too? :)
    Thank you.

  3. It it does not support folders like sshmenu does, it is not for me with over 20 hosts, unfortunately.

  4. Thanks, Anil! I’ve been looking for a simple and elegant solution supporting ubuntu 11.04.

    I also liked the idea of nested entries, so I took the liberty of modifing your code to add a very basic support for menus and submenus. It can be found here: https://gist.github.com/1189327. Please note that importing nested menus from sshmenu configuration was not implemented.

  5. A few things sshmenu supported that would nice to have: loading an ssh key if it exists and isn’t loaded and geometry on the terminals.

  6. Very many lots of thanks for this! That should go to repos, definitely! To get better it just needs a config GUI, other than that THE perfect replacement for sshmenu!

  7. Woohoo!!!! Good work man. This is what I need to make the change to Unity a lot smoother!! Thanks a lot, it works good on 11.10!!

  8. Hello,

    another sshmenu user that switched to unity here, thanks :)
    The only thing I’m missing now is the “open all as tabs” feature.

  9. Hi,

    thanks for the good work !

    Could take into account the “Profile” from SSHMenu, and it would also be lovely to change the title of the window to the name of remote machine.

  10. This was the feature I absolutely required to comfortably move past classic Ubuntu, so thank you for making it!! — even better than the original sshmenu no less!

    One trick for me though: the “Launch” text and the netstatus icon were just too big to my mind, I sorely missed the sshmenu simplicity of simply “SSH”, so here’s how I changed it to match that:

    sed -i ‘s|”gnome-netstatus-tx”|””|’ sshplus.py && sed -i ‘s|”Launch”|”SSH”|’ sshplus.py

    (Both lines modified are in the __main__ at the end of the application.)

    Again, thank you so much for making this!!

    My complete installation script for those who would like it super simple as well:

    wget -NP ~/ https://raw.github.com/anilgulecha/misc/master/sshplus.py &&
    chmod a+x ~/sshplus.py && sed -i ‘s|”gnome-netstatus-tx”|””|’ ~/sshplus.py &&
    sed -i ‘s|”Launch”|”SSH”|’ ~/sshplus.py && sudo mv ~/sshplus.py /usr/local/bin/ &&
    cat < ~/.config/autostart/sshplus.desktop
    [Desktop Entry]
    Type=Application
    Exec=/usr/local/bin/sshplus.py
    Hidden=false
    NoDisplay=false
    X-GNOME-Autostart-enabled=true
    Name[en_US]=SSHplus
    Name=SSHplus
    Comment[en_US]=SSHplus dropdown menu for ssh/etc connections
    Comment=SSHplus dropdown menu for ssh/etc connections
    END

  11. Hmm, in my last comment it messed up the startup script output line, which should have been:

    cat < ~/.config/autostart/sshplus.desktop
    but without the space between the < < (less thans) before END

  12. I’m with Arjen: “The only thing I’m missing now is the “open all as tabs” feature. ”

    +1 (I’m missing it very much :'( ).

  13. Just in case others need clarification – set sshplus up as per the instructions – then add your current .sshmenu file into your home directory. Your config file will then be picked up by sshplus.

  14. Hi, just dropping a BIG thanks – consider this a “+5″

    If you feel like messing around with this any more, you could add “Edit configuration” running “gedit ~/.sshplus”. I just added it to .sshplus as a “normal” launcher

    And did I say “thank you”?

  15. Hi guys, this little peace of software is almost perfect!
    I use it heavily at home and at work.

    There is only one small feature I wish to be implemented: ability to use variables in the config file
    Why? Use case: .sshplus config file is used on different machines with different display resolutions – I always have to preserve the different resolutions in my rdesktop calls as I work on multiple servers concurrently which is why I am no friend of fullscreen setting :)

    But anyways: thank you for this great tool!

  16. I assume you run this using “python sshplus.py”

    It gives the following error:

    Traceback (most recent call last):
    File “sshplus.py”, line 33, in
    import appindicator

    So i installed python-appindicator “sudo apt-get install python-appindicator”

    And tried to start it again using “python sshplus.py”

    Then it thinks for a while and spits the error:
    Traceback (most recent call last):
    File “sshplus.py”, line 267, in
    gtk.main()
    KeyboardInterrupt

    (sshplus.py:10154): libappindicator-WARNING **: Unable to send signal for NewStatus: The connection is closed

  17. I was so frustated when i saw my 78 server-based ssh-menu is not supported in Debian 7.x – Gnome 3, but now i’m very happy for Your Solution….it works great!!!!!!

    Some python adjustment, a bit of fantasy, some hand-made icon and all is done!!!

    Thanks a lot, really!!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>