Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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?

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.

Edit: Running vncserver command on linux box made the setup. Now VNC viewer connects and displays XTerm. Many thanks!

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 PuTTY and use it to telnet or ssh into the 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.

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.

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.

Another edit: In response to your comments/edits. I've used the TightVNC viewer 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.

It is remote host; the fact that it is virtual is irrelevant, sorry. I have PuTTY, thank you. My problem is display variable then: "xterm Xt error: Can't open display:" How would I set it, the confusion is do I run "set DISPLAY myWindowsMachine" or "set display=myWindowsMachine:0" -- the permutations of thereof are endless! Tegiri Nenashi Nov 16, 2010 at 22:34 No value of DISPLAY will work if you don't have a functioning X11 setup on your Windows machine. If you don't have console access to the Linux machine, I think your options are X11 on Windows or a VNC client to control the linux desktop remotely. I expect VNC will be the less painful solution, but the remote server must be configured to accept the connection. eaj Nov 16, 2010 at 22:40 After little research, it seems that PuTTY is just telnet client, and I don't see its point, as one can telnet from DOS command box anyway. Tegiri Nenashi Nov 16, 2010 at 22:44 I use PuTTY because it's also an ssh client, and I always need, or at least want, that secure connection. If you were to install (for example) cygwin with X11 support, you could use its command-line ssh and, with an appropriate DISPLAY setting, run xterm or any other GUI on your local display. I've never tried this; it's always seemed easier to get a remote desktop connection via VNC or the virtualization software hosting the Linux VM. eaj Nov 16, 2010 at 22:53

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.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .