Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • August 31, 2015, 08:54:45 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: FARR plugin: PuTTY (preliminary discussion)  (Read 7987 times)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 2,702
    • View Profile
    • Donate to Member
FARR plugin: PuTTY (preliminary discussion)
« on: January 09, 2009, 08:35:17 AM »
I'm considering a PuTTY plugin.  I have some code that seems to work for various definitions of "PuTTY".

I don't understand why there are so many flavors of PuTTY.  Below is a summary of what I've learned so far about the various flavors.  If you happen to notice any of it is incorrect or something relevant is omitted, I would appreciate being informed.

   PuTTY (the original)
     http://www.chiark.greenend.org.uk/~sgtatham/putty/
     * registry-based sessions
       * putty.exe -load "session name"
       * HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions

   KiTTY
     http://kitty.9bis.com/
     * registry-based sessions
       * kitty.exe -load "session name"
       * HKEY_CURRENT_USER\Software\9bis.com\KiTTY\Sessions

   KiTTY Portable
     http://kitty.9bis.com/
     * file-based sessions
       * kitty_portable.exe -load "session name"
       * <exe-folder>/Sessions/<encodeURIComponent(session-name)>

   PuTTY Portable
     http://portableapps.com/apps/internet/putty_portable
     * registry-based sessions
       * putty.exe -load "session name"
       * HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions

   portaPuTTY
     http://code.google.com/p/portaputty/
     * file-based sessions
       * putty.exe -load "session name"
       * <exe-folder>/.putty/sessions/<encodeURIComponent(session-name)>

   PuTTY Tray
     http://www.xs4all.nl/~whaa/putty/
     * file-based sessions
       * putty.exe -loadfile "session name"
       * putty.exe -file "session name"
       * <exe-folder>/sessions/<encodeURIComponent(session-name)>
     * registry-based sessions
       * putty.exe -load "session name"
       * HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,959
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #1 on: January 09, 2009, 08:47:42 AM »
Quote
I don't understand why there are so many flavors of PuTTY

not to open up a can of worms but this is one of the few things i consider troublesome about open source stuff.. the possibility of grenade-like-fragmentation-forking.

if it were me i would just write one plugin with support for file-based or registry-based sessions, depending on the putty version i personally used, and then with an option for the registry key or directory path so users could customize that.  then if someone else wants to modify your plugin to support registry (if you choose file), or vice versa, they can modify your plugin.  i think it's too much to expect you personally to write your plugin to handle all of these cases.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,959
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #2 on: January 09, 2009, 08:51:51 AM »
of course the *ideal* solution would be if the plugin could keep a list of ALL registry paths of all the dif putty versions, and all file paths, and then display the combined list of all sessions found.. but that seems like maybe more effort than its worth.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 2,702
    • View Profile
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #3 on: January 09, 2009, 08:56:39 AM »
Thanks for the comments.

I considered trying something like the combined approach you described, but I wasn't sure I could come up with something consistent.  I think if all of the different forks used mutually exclusive locations it would be straight-forward, but they don't seem to (i.e. there is some overlap).  May be there is some way to make sense of this that I am not seeing :)

bgd77

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #4 on: January 29, 2009, 01:22:08 AM »
I was a little shocked to see that there are so many PuTTYs. In the company we only use the original version, I do not think that any colleague of mine has heard of the other variants.  So, thanks for the information, I'll have to research the other variants to see if they bring anything new and useful for us.  :Thmbsup:

Anyway, this plugin would be a great one! If you have problems with the various flavors, you could try, at first, to make the plugin work only with the original version of it and after that try to adapt it to all of them.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 2,702
    • View Profile
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #5 on: January 29, 2009, 08:56:43 AM »
Thanks for the feedback :)

Hmm, I will consider it -- at this point though, I have a version that works w/ more than just the original, so I'd be going back to remove/disable some portions before releasing.  I don't mind doing that in theory, it will just require some work if I decide to proceed with that course ;)

bgd77

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #6 on: January 29, 2009, 09:15:11 AM »
OK. I'm looking forward to testing your plug in.  :)

KiTTY seems to have some quite useful features, I think I will use it instead of PuTTY.  ;)
So, thanks for the info!

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 2,702
    • View Profile
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #7 on: January 29, 2009, 08:30:51 PM »
Hmm, if KiTTY is what you are going to use is there a point in me changing my plugin to handle the original PuTTY only?

bgd77

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #8 on: January 30, 2009, 02:32:42 AM »
Of course not. The more versions you can cover, the better. It was just an idea not to include the ones that are causing you troubles...

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 2,702
    • View Profile
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #9 on: January 30, 2009, 02:57:22 AM »
My current difficulty is not that I haven't come up with code to handle the various cases -- it is more about how can I sanely bring the pieces together ;)

One issue is, how would a potential user end up using this plugin?  What'd be great is if no configuration is required -- this doesn't seem likely to me though because of the installation location of executables varying, not to mention where session information lives.  So if configuration is required, how should this be handled, I wonder.  Also, what if multiple applications (e.g. KiTTY and PuTTY) are installed?  Should the plugin be able to handle both at the same time -- if so, how?

Perhaps I am starting to give a bit of the flavor for my current difficulties w.r.t. this plugin :)

Happy to discuss these issues -- hoping that that sort of exploration may lead to some kind of sensible set of ideas.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 8,858
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #10 on: January 30, 2009, 09:16:27 AM »
It's really unfortunate that the PuTTY authors aren't very keen on accepting other people's feature-adding patches, which is why we have all those different versions - *sigh*. I'm currently using puttytray, mainly because of it's URL-linkifier.

What's the point of the FARR plugin? Portable sessions?
- carpe noctem

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 2,702
    • View Profile
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #11 on: January 30, 2009, 05:17:02 PM »
I think the main incentive for a FARR plugin is access to sessions.

See for example, starting from:

http://www.donationc....msg139773#msg139773

Ric0la

  • Participant
  • Joined in 2009
  • *
  • gravatar avatar
  • Posts: 11
    • View Profile
    • Donate to Member
Re: FARR plugin: PuTTY (preliminary discussion)
« Reply #12 on: July 10, 2009, 12:47:56 PM »
Hi all!

I would actually favour another approach for putty. My farr coding skills are below zero, but maybe someone would like to volunteer.

Let's suggest we have a flatfile named "putty_sessions.txt" with some content similar to this:


#Alias;params
My Lil Server;-load green -ssh rico@aa.bb.cc -i C:\.ssh\myprivkey.ppk
Another one, production!;-load red -ssh root@xx.yy.zz -i C:\.ssh\myprivkey.ppk

In the farr plugin config, there's something like this:


Command=C:\Program Files\PuTTy\putty.exe
Params=C:\whatever\putty_sessions.txt

Now, the farr plugin of my dreams would parse the file and kind of compile an alias file out of it (on the fly of course):


^ssh (.*)$
My Lil Server | C:\Program Files\PuTTy\putty.exe -load green -ssh rico@aa.bb.cc -i C:\.ssh\myprivkey.ppk
Another one | C:\Program Files\PuTTy\putty.exe -load red -ssh root@xx.yy.zz -i C:\.ssh\myprivkey.ppk


This would actually be very easy to handle: Instead of adding 100s of putty sessions into the registry, just put them in the textfile in this format. The "-load red" loads the color scheme in my cases. I already have putty aliases similar to this, but they are quite hard to maintan.

What do you think? Is this feasible?

Cheers

Rico

PS: To be honest, I'd already have other purposes than putty. E.g. Ora SQL logins etc.