18

Being on Windows and accessing Linux via Putty, 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 new Putty window open?

Similar can be done by Putty menu Duplicate session, but I am interested with command line version.

2
  • How would you identify the session to "duplicate" on command-line? – Martin Prikryl May 28 '13 at 13:06
  • If I knew I would not ask. I can't say Linux does not identify terminals it communicates with. – Dims May 28 '13 at 13:09
22

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.

2
  • +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 ^^ – Levite Nov 3 '14 at 11:14
  • +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! :-) – ColdCold Nov 7 '16 at 14:52
3

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.

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.