0

I've got a remote Ubuntu box (a Linode) that I need to run a Java program which is not headless (it has a GUI window). I am having the worst time trying to get this to work. I don't need a whole desktop, just a window. Starting with a minimally installed Ubuntu, can you recommend a lightweight strategy for doing this?

1 Answer 1

2

Do the following to get it running on your VPS. Once you SSH in, do the following:

sudo apt-get install vnc4server openbox
vncserver # enter password, verify
vncserver -kill :1
  • Now open up ~/.vnc/xstartup, comment out the last line x-window-manager & and insert openbox-session & instead.

  • Start VNC with vncserver -- ensure port 5901 incoming is open if you have a firewall enabled.

  • Connect to display 1 (or port 5901) with any VNC client. You'll get the gray openbox-session background along with a default xterm and some VNC options:

    enter image description here

  • Start your programs which need a GUI, etc. Right-clicking anywhere will let you open more terminals. You can change the default terminal to something other than xterm by installing another terminal emulator. I recommend sakura as it's lighter than installing gnome-terminal, etc.

2
  • Thank you so much for posting this. There's not a straightforward tutorial like this anywhere on the Internet. I had to export DISPLAY=mybox:1 before running the Java program. For the VNC client I got "SSL/SSH VNC viewer" from the Ubuntu Software Center. I could not get it to connect through SSH, but it worked when I changed authentication to "None" (sounds bad).
    – Pete
    Jun 13, 2012 at 3:37
  • Is there a way to connect using certificates, like ssh, or are we limited to passwords?
    – Pete
    Jun 13, 2012 at 14:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .