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.

25 Comments

  1. dakira says:

    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. WladyX says:

    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. sshmenu user says:

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

  4. WladyX says:

    I have over 150 :)

  5. Fabio says:

    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.

  6. admin says:

    Cool, thanks. I’ll integrate this into my build when I get some time.

    ~Anil

  7. John says:

    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.

  8. Marcio Merlone says:

    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!

  9. ike says:

    Absolute rubbish. One error after the other.
    Needs an useless .sshmenu file. After that errors out again.

  10. admin says:

    A tiny bug was fixed.. does it not work for anyone else? (grab the latest file from github)

  11. Raúl says:

    Extremely useful, specially in unity.

    Many thanks!

  12. Stefano says:

    Hi all,

    I have developed a clone of sshmenu for gnome-shell (tested on Fedora 16).
    You can download from https://github.com/sciancio/connectionmanager

  13. Greg says:

    This is awesome! Simple and works great!

  14. maurizio says:

    Great tool – works flawlessly in my Ubuntu 11.10 setup. Now I don’t miss sshmenu anymore!

  15. Vo says:

    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!!

  16. Arjen says:

    Hello,

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

  17. Thibaud says:

    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.

  18. Chris says:

    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

  19. Chris says:

    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

  20. Henry says:

    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 :’( ).

  21. bailey86 says:

    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.

  22. Eugen Rieck says:

    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”?

  23. [...] Malheureusement, sshmenu ne fonctionne pas avec unity. Heureusement, il existe un autre logiciel qui permet de faire la même chose et même plus, c’est SSHplus. [...]

  24. Nicolas says:

    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!

Leave a Reply