Welcome Guest.   Make a donation to an author on the site September 30, 2014, 11:01:49 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2013! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: FARR plugin: PuTTY (preliminary discussion)  (Read 7431 times)
ewemoa
Honorary Member
**
Posts: 2,443



View Profile Give some DonationCredits to this forum member
« 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
Logged
mouser
First Author
Administrator
*****
Posts: 33,422



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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.
Logged
mouser
First Author
Administrator
*****
Posts: 33,422



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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.
Logged
ewemoa
Honorary Member
**
Posts: 2,443



View Profile Give some DonationCredits to this forum member
« 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 smiley
Logged
bgd77
Supporting Member
**
Posts: 203


see users location on a map View Profile Give some DonationCredits to this forum member
« 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.
Logged
ewemoa
Honorary Member
**
Posts: 2,443



View Profile Give some DonationCredits to this forum member
« Reply #5 on: January 29, 2009, 08:56:43 AM »

Thanks for the feedback smiley

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 Wink
Logged
bgd77
Supporting Member
**
Posts: 203


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #6 on: January 29, 2009, 09:15:11 AM »

OK. I'm looking forward to testing your plug in.  smiley

KiTTY seems to have some quite useful features, I think I will use it instead of PuTTY.  Wink
So, thanks for the info!
Logged
ewemoa
Honorary Member
**
Posts: 2,443



View Profile Give some DonationCredits to this forum member
« 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?
Logged
bgd77
Supporting Member
**
Posts: 203


see users location on a map View Profile Give some DonationCredits to this forum member
« 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...
Logged
ewemoa
Honorary Member
**
Posts: 2,443



View Profile Give some DonationCredits to this forum member
« 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 Wink

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 smiley

Happy to discuss these issues -- hoping that that sort of exploration may lead to some kind of sensible set of ideas.
Logged
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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?
Logged

- carpe noctem
ewemoa
Honorary Member
**
Posts: 2,443



View Profile Give some DonationCredits to this forum member
« 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.donationcoder....=8071.msg139773#msg139773
Logged
Ric0la
Participant
*
Posts: 11

see users location on a map View Profile Give some DonationCredits to this forum member
« 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.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.039s | Server load: 0.08 ]