0

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

1

2 Answers 2

2

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/

3
  • 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, 2013 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, 2013 at 1:11
  • 1
    sourceforge.net/projects/xming
    – sam yi
    Aug 12, 2016 at 9:19
0

Hmm you've got multiple issues here. Firstly, Ubuntu Server does not come with a GUI so you would have to install xorg and a desktop environment. xinit and startx alone are not sufficient. I normally use LXDE.

Secondly you would need a client program on the Windows side to display the forwarded X11 apps. And finally, VNC Viewer is not an X11 client program.

If you still want to go the VNC route, you'd also need to install tightvnc or similar on the server side. You should not be running VNC Viewer in listening mode.

More details here on Installing a lightweight LXDE+VNC desktop environment on your Ubuntu/Debian VPS

1
  • 1
    Can you add more details on the answer. Currently it's not very helpful
    – Anwar
    Nov 7, 2016 at 8:03

You must log in to answer this question.

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