Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following context:

  • Work under Windows 7
  • Want to develop Ruby on Rails under Linux
  • Want to use X-Windows (e.g. Sublime Text or other tools)
  • Have installed Cygwin and X-Windows

I have now the following problem: When I am offline, my host machine (Windows 7) has no IP address. When I then try to start X-Windows (locally), this works well, but I have no IP address to define the display variable for starting e.g. an xterm under Linux in the VMware image. The VMware image (Ubuntu Linux) has a stable IP address, being online or offline, but my host machine (Windows 7) has not.

Is there something I can do to work offline with X-Windows in the VMware image? I can of course use ssh, tmux and the like, but I would like to know if there is a solution to that problem.

share|improve this question
up vote 1 down vote accepted

The obvious solution is to set up a host-only network in Vmware, on which Windows will have a static address. This can be done by adding another network adapter to the VM. You might have to set a static address for the interface in Windows, but this should not interfere with anything else.

Similarly, a NAT setup for the VM includes a static address for the host. If you don't need bridging, this is an option.

Another solution is to run a local X server in stead, and use X over ssh for your xterms.

share|improve this answer
The tip that worked best for me was to just use NAT setup and to use then the static address of the host. I can now write scripts that use that static address only, which will be stable over time. Thank's for your solution! – mliebelt Mar 15 '12 at 7:01

The easiest is to start Xvnc in server side and use any VNC client to connect. You do not need any X server in your Windows machine. If you do not need Windows itself during the development, it is best to set Xvnc display size the same you are using in your Windows workstation and use full screen mode all times. Except you miss audio, it looks exactly like you are working behind your Linux server. Good thing is that you do not need your own workstation to access it and can use any PC where VNC client can be easily installed. To make it secure, use SSH port forwarding (works also with putty) and make Xvcc listen only loopback IP

Here is how I use that. Add /etc/X11/xdm/Xservers line:

:1 local /usr/bin/Xvnc :1 -localhost -geometry 3840x1200 -depth 24 -desktop banana -wm -dpi 95

Then you can connect to :1 but only from localhost. To connect that remotely, do first SSH to your server with "LocalForward 5901" and then open just screen ":1" from your workstation

share|improve this answer
Wow, that sounds interesting. If will definitively give it a try ... – mliebelt Mar 14 '12 at 8:46
I gave it a try, but had more problems than expected. Reason for that could be that I am using an Ubuntu server version (no X preinstalled), so I have to fix some of the problems with setting up an X-Server first. To use NAT for VMware solved the problem of changing IP, so I will stop my experiment now. But thank's for a possible solution. – mliebelt Mar 15 '12 at 7:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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