Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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: http://x.cygwin.com/

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

 
discard

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.