Search code examples
javaubuntuvirtual-machinejvisualvmx11

How to run X Windows from a (headless) Ubuntu server?


We have an Ubuntu server VM that is running a Java application on it, and I need to profile it using Java's JVisualVM GUI tool.

I need to SSH into the server (say, ssh admin@ourapp.example.com) and turn on X Windows so that I can run JVisualVM at the terminal and have the X Window "break out" of the VM and run on my host (a Windows 7 machine).


Solution

  • Following are the steps :

    1. Install X-Windows on your Windows 7 machine (example exceed or Xming)
    2. ssh to your unix machine
    3. export DISPLAY to the ip address of you Win 7 box export DISPLAY=10.10.20.30:0.0
    4. Test it by running xterm or JVisualVM