Linux Windows 上的 XTerm
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4199594/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XTerm on windows
提问by Tegiri Nenashi
I have Swing Java application manifesting an error on linux, which I need to fix. The main problem is getting linux environment, and I'm unwilling to install one because I have a remote linux box already. Now, the GUI part, how would I run xterm on windows? I made several shots in the dark: installed XMing, and then got totally confused what to do next. RealVNC is equally challenging. Do I run VNC server in service or user mode, or do I start the third option: VNC viewer? If you haven't noticed, I'm totally confused what is the server and what is client -- I was told that X_window community got it totally wrong, and what everybody else in computer field calls client is server?
我有 Swing Java 应用程序在 linux 上显示错误,我需要修复它。主要问题是获取linux环境,我不愿意安装一个,因为我已经有一个远程linux盒子了。现在,GUI 部分,我将如何在 Windows 上运行 xterm?我在黑暗中拍了几张照片:安装了 XMing,然后完全糊涂了下一步该做什么。RealVNC 同样具有挑战性。我是在服务模式还是用户模式下运行 VNC 服务器,还是启动第三个选项:VNC 查看器?如果您没有注意到,我完全混淆了什么是服务器和什么是客户端——我被告知 X_window 社区完全错了,而计算机领域的其他人都将客户端称为服务器?
So, why can't I just run "xterm remoteLinuxHost" just the way I do "telnet remoteLinuxHost"? Why there is a zillion steps to do such trivial thing? Would appreciate if anybody would guide me through this pain.
那么,为什么我不能像执行“telnet remoteLinuxHost”那样运行“xterm remoteLinuxHost”?为什么有无数的步骤来做这样微不足道的事情?如果有人能指导我度过这种痛苦,我将不胜感激。
Edit: Running vncserver command on linux box made the setup. Now VNC viewer connects and displays XTerm. Many thanks!
编辑:在 linux 机器上运行 vncserver 命令进行了设置。现在 VNC 查看器连接并显示 XTerm。非常感谢!
采纳答案by eaj
I'm a little unclear on what you're trying to do, but if you just need to get a shell open, the easiest thing to do would be to install PuTTYand use it to telnet or ssh into the VM.
我有点不清楚您要做什么,但如果您只需要打开一个 shell,最简单的方法就是安装PuTTY并使用它 telnet 或 ssh 进入 VM。
If you want to run a (gui) Java application on the Linux VM, it seems to me that the easiest thing to do would be to install the X11 environment in the VM and run the application in the VM console. That way, the application and the GUI are all on the Linux system and you don't have to muck around with remote X sessions.
如果您想在 Linux VM 上运行(gui)Java 应用程序,在我看来,最简单的方法是在 VM 中安装 X11 环境并在 VM 控制台中运行该应用程序。这样,应用程序和 GUI 都在 Linux 系统上,您不必为远程 X 会话而烦恼。
In any case, getting a working X11 environment in Windows is likely to be a lot more hassle than doing it in Linux. It's certainly not a trivial thing, anyway.
在任何情况下,在 Windows 中获得一个有效的 X11 环境可能比在 Linux 中更麻烦。无论如何,这当然不是一件小事。
Edit:In response to your edited question, you shouldn't need to use a VNC viewer or anything like that either. If you're using VirtualBox or VMWare, you can open a console window that essentially functions as the "monitor" on your VM.
编辑:为了回答您编辑的问题,您不需要使用 VNC 查看器或类似的东西。如果您使用的是 VirtualBox 或 VMWare,则可以打开一个控制台窗口,该窗口本质上用作 VM 上的“监视器”。
Another edit:In response to your comments/edits. I've used the TightVNCviewer for Windows to access a Linux box at work from home, and it worked fine. Performance can be a bit jerky depending on available bandwidth.
另一个编辑:响应您的评论/编辑。我已经使用Windows的TightVNC查看器在家中访问 Linux 机器,并且运行良好。根据可用带宽的不同,性能可能会有些不稳定。
回答by Timothy Strunk
Cygwin for windows will work. Install only what you need for the X system. In a Cygwin prompt you can the SSH to the host and with the -X option to pass X11 forward. Then the GUI applications will run the same as if your on the Linux system. You just have to keep in mind that the application is running on the Linux server and not the Windows host. It can confuse some people when trying to access files.
适用于 Windows 的 Cygwin 将起作用。仅安装 X 系统所需的内容。在 Cygwin 提示符下,您可以通过 SSH 连接到主机并使用 -X 选项向前传递 X11。然后 GUI 应用程序将像在 Linux 系统上一样运行。您只需要记住该应用程序是在 Linux 服务器上运行,而不是在 Windows 主机上运行。在尝试访问文件时,它可能会使某些人感到困惑。