Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Documentation should describe how to use Sessions in File #49

Closed
jaraco opened this issue Oct 2, 2012 · 8 comments
Closed

Documentation should describe how to use Sessions in File #49

jaraco opened this issue Oct 2, 2012 · 8 comments

Comments

@jaraco
Copy link

jaraco commented Oct 2, 2012

Since the upstream documentation only describes sessions in the registry, it's not clear how Sessions in File works. The web site and wiki only currently list features. I was unable to find any documentation on how to use PuTTYTray-specific features.

Some things the documentation could cover:

  • how to use sessions in file (used by default if no sessions, including Default, are defined in registry)
  • where are sessions files stored
  • how one can customize where session files are stored (if possible)
  • how to migrate from registry-based sessions to file-based sessions

If someone would answer these questions here, I'll edit the wiki.

@xurubin
Copy link
Contributor

xurubin commented Apr 25, 2013

Here is the documentation from the author of PuTTY file patch: http://jakub.kotrla.net/putty/

EDIT: This does not look like the same winstore.c. However after going through PuTTYTray's winstore.c, I think the functionalities are similar (putty.conf, with five supported directives).

@genericmoniker
Copy link

I agree that some documentation would be very useful.

With some experimentation, I can take a stab at some of the questions:

  • how to use sessions in file: There is a radio button on the main screen to switch between the registry or files
  • where are session files stored: In a "sessions" folder in the same location as the putty.exe (or just the current directory?)
  • how can one customize: I don't know.
  • how to migrate: You can use the radio button to select registry sessions, load one, switch the radio button to file sessions and save it.

Other questions I have:

  • Can I have putty start with the file sessions radio button selected instead of the registry sessions?
  • Is there a way for pageant to read the file sessions for its "Saved Sessions" menu? It only seems to read registry sessions.

And a comment:

It would be nice if the session files were a bit friendlier for editing, such as only writing settings different from the defaults, using a more typical INI/cfg syntax, and even having a file extension.

@Nilzor
Copy link

Nilzor commented Oct 14, 2014

I am a bit surprised to see two year old issues like this open, while there repo itself is fairly active (commits under a month ago). After following @xurubin's link, I found that changing the folder to save to is indeed configurable by creating a file named putty.conf in the same folder as the .exe file. By entering a single line with the sessions-property, you can change the folder to save to like this for instance :

    sessions=%USERPROFILE%\.puttysessions

Yet, when I tried this, the program crashes on startup so I'm just as far.

There are (at least) two duplicate issues on this: #127 and #112

Is it so hard to document this properly and close these three issues? I can contribute if anyone tells me why my puttytray is crashing. I've tried c:\temp and putting the same exact contents ther as in the default session folder to no avail.

I would like to page user @voltagex, since he seems to have solved this problem but is facing a follow-up issue in #125

@ghost
Copy link

ghost commented Oct 14, 2014

@Nilzor I just stored PuttyTray in SkyDrive itself - I didn't "change" the folder path per-se.

@ghost
Copy link

ghost commented Oct 14, 2014

I think you should open a separate issue for the crash on startup - I just reproduced it here.

@Nilzor
Copy link

Nilzor commented Oct 15, 2014

@voltagex Ah, funny I didn't think of that :-) Good news though, I found the issue: The file has to end with a new line for it not to crash! So now I can use chocolatey to install the app (which installs it on a local drive) and still be able to load the sessions from SkyDrive! Good times .-)

Separate issue created on the newline-thing

@anzz1
Copy link

anzz1 commented Jun 17, 2023

Thanks for this, so for clarification when you want a portable installation, follow these steps:

  1. Create a empty putty.conf file next to putty.exe
  2. For "Default Settings" and each of the settings you might already have in the "Sessions from Registry" tab:
    • "Load" it, then change over to "Sessions from file" tab and "Save".
    • "Delete" it from the "Sessions from registry" tab.
  3. Delete the HKEY_CURRENT_USER\Software\SimonTatham\PuTTY registry key for good measure.
  4. Now all the settings will be saved in the PuTTY directory which you can take anywhere with you, and PuTTy will open to the "Sessions from file" tab by default, and registry will be untouched from now on.

@jaraco
Copy link
Author

jaraco commented Jun 18, 2023

This is amazing. Thanks. I updated the File Behavior wiki page to include this guidance, which I'm sure would have served me well at the time.

@jaraco jaraco closed this as completed Jun 18, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

6 participants