9

Is it possible to auto attach any putty.exe or kitty.exe console windows to ConEmu? If yes, then how can it be done?

8
  • What do you mean with "auto attach"?
    – Maximus
    Commented May 7, 2014 at 13:44
  • well, at least, when you have your ConEmu open and then open, e.g. putty.exe console window, then it could auto attach to ConEmu as a new tab.
    – serge.k
    Commented May 8, 2014 at 14:18
  • even better, if you do not have a ConEmu app running yet, and you launch putty, then it could open ConEmu and open putty in its tab
    – serge.k
    Commented May 8, 2014 at 14:21
  • Why not to run putty in ConEmu? The way you want to run PuTTY matters.
    – Maximus
    Commented May 8, 2014 at 17:33
  • yeah, It does, actually, that is why I asked. When you run, e.g. putty or kitty, you get a configuration window, where one can choose any saved connection, and then open it. If you do it from putty/kitty GUI, console is started outside ConEmu, but I would like to have it automatically opened as ConEmu tab.
    – serge.k
    Commented May 9, 2014 at 11:25

6 Answers 6

4

I was looking to do the same thing and found this link

http://www.thecrumb.com/2013/03/04/configuring-conemu-and-putty/

I think it's basically what Maximus was saying but you will do this from inside ConEmu

2
  • 2
    yes, you are right, it is possible to do it one by one, but if you open connections with putty GUI, then connection console is outside ConEmu - that is the problem, I am trying to solve.
    – serge.k
    Commented Oct 2, 2014 at 14:37
  • 1
    if you open PuTTY without any switches via ConEmu then the config window appears and the console itself gets sucked into a tab after you did the setup
    – masterX244
    Commented Feb 13, 2015 at 23:17
3

Guys I just found the way! Totally possible without create shortcut for every session to load.

I just found that CMDER has a default task named {Putty}. It just launches Putty.exe directly (so putty.exe should be in path, or you should specify the full path of putty.exe).

enter image description here

Create a shortcut of CMDer with arguments:

<full-path-to-cmder.exe> /task Putty

Open it, and the Putty prompt shows. Load your session as usual, and it now shows in Cmder instead of putty, voila!

enter image description here

I knew such a common requirement has a solution in CMDER. Perfect!

Except that you have no control over the tab title, but we cannot ask for more...

EDIT:

I just found that we can specify the window title in Putty when we use Cmder, so now my solution becomes more than perfect.

In putty, we can set a window title in "Window" - "Behaviour", and in Cmder, we set the tab to use putty window title in "Main" - "Tab bar" - "Tab templates" - "Console" (%s represents the title, as shown in the tips above "Console".)

Another two screenshots:

enter image description here

enter image description here

2

As an alternative simply use SSH

ssh root@somehost

For example add the tools packaged with Git to your path

set PATH=%PATH%;C:\Program Files (x86)\Git\cmd

Or powershell path

# %UserProfile%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
# Add linux tools from git
$env:Path += ";C:\Program Files (x86)\Git\bin"

... And if going down that tangent consider only asking for your key passphrase once and Powershell with Posh git

2
  • assuming you're using PuTTY for SSH...
    – endolith
    Commented Jun 22, 2017 at 18:54
  • No git bash is built with MinGW, no PuTTY here
    – KCD
    Commented Jun 24, 2017 at 0:30
1

Single click? I think you are meaning "shortcut click".

So, change your shortcut properties.

Example 1

ConEmuC.exe /ATTACH /ROOT PuTTY.exe <your PuTTY switches>

Example 2

ConEmu.exe /single /cmd PuTTY.exe <your PuTTY switches>

Thought, you need to use full paths to executables.

7
  • 1
    this is a good comment, but the problem is, that for every connection I have in putty/kitty I need to make a shortcut, that is a lot of work, that surely can be done, but not very elegant))
    – serge.k
    Commented Jun 9, 2014 at 21:58
  • What I need is when ANY putty session is opened it automatically attached to ConEmu as a tab.
    – serge.k
    Commented Jun 9, 2014 at 22:01
  • You still have NOT said, how exactly you are running your PuTTY instance!
    – Maximus
    Commented Jun 10, 2014 at 5:13
  • Actually he did. He simply wants to start it the normal way so he gets the config popup and can choose a saved session and when it actually starts the session it should be attached.
    – Blizz
    Commented Sep 22, 2014 at 11:39
  • so, yeah, Blizz is right, I am starting a putty/kitty session just a normal way like this: screencast.com/t/cpLCTdV8bU But the window is not attached automatically to ConEmu, hope it is a bit more clear now.
    – serge.k
    Commented Feb 4, 2015 at 14:12
0

AntonioCS has the correct link.

I was struggling with this too. The key is not to put the full path for putty in the conemu task command. Instead, make sure the path to putty is in your Windows, User profile environment variable, and then just call out putty by itself:

Putty.exe -new_console -load "(name of session)"
-2

Adding to KCD's answer, yet another option is using SSH under Cmder for Windows[http://cmder.net/], as shown in this article:

One needs only to type:

ssh user@hostname

A great advantage pointed in the article is that "Cmder is easy on the eyes, with attractive fonts, default Monokai color scheme, and resizable windows".

3
  • 1
    Please read the question again carefully. Your answer does not answer the original question. The question is about ConEmu not Cmder.
    – DavidPostill
    Commented Jul 1, 2016 at 20:53
  • That's right, @DavidPostill. I just thought it was worth suggesting.
    – diegowcs
    Commented Jul 4, 2016 at 13:44
  • 1
    cmder uses conemu underneath
    – WesternGun
    Commented Nov 16, 2017 at 8:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .