New terminal window (duplicate session) from Putty command line?
Solution 1
In Putty Settings > Window > Behavior, you can check one of the boxes to open the system menu on a certain keypress (I personally use ALT-Space).
With this setting in place, you can hit ALT-Space, then type the d key to Duplicate Session. This will allow you to open a new putty window without needing to touch the mouse.
It's not a command line tool, but I find it extremely useful.
Solution 2
There is no straight forward way to issue a command on a Linux host through ssh that will instruct the windows host where the ssh connection originated to spawn a new putty instance.
The remote host knows about putty only that it is a terminal capable of running a certain shell. It's not supposed to know how to spawn a new terminal on the local client.
Conceivably, it is possible to throw together a script of sorts (or look for a windows netcat clone) that will listen for a "ping" and spawn a new Putty. The second part of this "system" would contact the windows script via TCP from the remote host.
Solution 3
If you don't want to touch the GUI, the only thing I can think of is using a terminal multiplexer like screen
or tmux
. This wouldn't give you another GUI window, but you could have multiple windows/panes inside of either.
Related videos on Youtube
Dims
Software developer & Machine Learning engineer C/C++/Java/C#/Python/Mathematica/MATLAB/Kotlin/R/PHP/JavaScript/SQL/HTML/ LinkedIn: http://www.linkedin.com/in/dimskraft Telegram: https://t.me/dims12 I prefer fishing rod over fish.
Updated on September 18, 2022Comments
-
Dims almost 2 years
Being on
Windows
and accessingLinux
viaPutty
, is it possible to spawn new terminal (Putty
) window from the command line? I.e. to send something to Linux, while responding on which, it initiate newPutty
window open?Similar can be done by Putty menu
Duplicate session
, but I am interested with command line version.-
Martin Prikryl about 11 yearsHow would you identify the session to "duplicate" on command-line?
-
Dims about 11 yearsIf I knew I would not ask. I can't say Linux does not identify terminals it communicates with.
-
-
Levite over 9 years+1 Very helpful, and actually much simpler/safer than implementing something that spawns putty sessions via a linux response, that has to be initiated by putty in the first place ^^
-
ColdCold over 7 years+1 Sweet... I didn't know it was necessary to select that option within PuTTY; it should really be the default. Alt-Space was actually the first thing I tried and I was shocked/irritated that it didn't do anything, because Alt-Space has ALWAYS been the Windows standard way of opening the system menu on any given window. To this day, the only way I know how to minimize a window from the keyboard is by hitting ALT-Space then 'n'. I use it all the time! :-)