我正在使用ConEmu这是一个很棒的 Windows 终端。 我还使用 MobaXterm,它有一个内置的 X 服务器,允许我运行 Linux 应用程序,并在我的 Windows 机器上运行它们的 GUI。
我希望能够通过 ConEmu 实现同样的目标。是否可以通过 ConEmu 上的 SSH 转发 X 并与 Xming 一起使用? 我尝试加载 Xming 并通过 SSH 从 ConEmu 中的标准 Windows cmd.exe 终端登录到我的 Linux 机器,但它不起作用。 也许这个问题与 ConEmu 无关,但也许 ConEmu 有一些我不知道的魔力......
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c7a9a8eaaaa8b5a2eab4a2b4b4aea8a9b487a8b7a2a9b4b4afe9a4a8aa" rel="noreferrer noopener nofollow">[email protected]</a>
debug1: Entering interactive session.
debug2: callback start
debug1: X11 forwarding requested but DISPLAY not set
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
最佳答案
[已编辑]:这不起作用,因为在同一时间,MobaXTermn 正在运行,而我正在使用他们的 X11 转发。
抱歉
I managed to forward X11 with Cmder (which is based on ConEmu) so I hope this will work !
Once you have lauched your Xming server on your local computer, look for "where" it display it : simply hover your mouse over the Xming notification in your notification tray icon, you will see a number, meaning it's diplayed on locahost:number
.
In example, when using MobaXTerm it is displayed on
localhost:11.0
.Once you know that, connect to your remote server as you normally do and on the prompt type
DISPLAY=XMING_ID;export DISPLAY;
where XMING_ID is where you displayed it ( eg :
localhost:0.0
orlocahost:11.0
)Then, graphic windows will be forwarded until you close this session. Then repeat. Just remember to launch Xming before your ssh session.
Hope this will help !
关于ssh - 将conemu终端与Xming一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35211892/