Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

The Goal:
I would like to open a program from my ubuntu server in my windows 7 desktop.

Steps Taken:
Putty > SSH > X11 check 'enable port forwarding'
I have started VNC Viewer in listening mode
started putty ssh session
apt get install xinit
startx &
geany (it's a c language ide; it uses the GUI so I"m using it to test x forwarding)

Error Messages:
geany returns "cannot open display"
startx returns "setversion 1.4 failed"

I'm working on Windows 7 and headless Ubuntu Server 12.04 LTS

Obviously I forgot something, but I'm having difficulty figuring out what. The goal is to not use sudo apt get install desktop, since I only want to use one program at a time, and anyway my server isn't hooked up to a monitor.

Any ideas? Questions? Thanks for your help! Curios

share|improve this question

To forward X11 apps over your ssh connection, there needs to be something on your Windows client to which the X11 applications can connect. In other words, you need to run an X server for Windows, which will translate X11 protocol messages from the ssh connection into graphical drawing commands and send mouse and keyboard actions back across the network.

There are several options for this, one is Cygwin/X:

share|improve this answer
Hi Paul, thanks for your response. I thought VNC Viewer was serving this purpose, but I'll check out cygwin. However, I'm not sure this explains why startx was returning that error message. Thanks! – curios May 21 '13 at 18:43
@curios, you don't need to run startx if you're forwarding your X11 display. Just start an X server on the Windows machine (as far as I can tell, VNC Viewer does not qualify), log in to the Ubuntu server with putty, and run geany straight away. – Paul May 22 '13 at 1:11

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.