How to set up x11vnc on freshly installed ubuntu server with no gui?

0

I installed Ubuntu 13.04 server on my remote server, and then proceeded to use tasksel to install ubuntu-desktop (which means GNOME i think). all remotely.

Now i'm logged on and want to start X and set up a vnc but I don't know how.

Up until this point I was physically present and had a GUI (which started X for me).

I tried running 'startx' as root, logging on as some user and type 'x11vnc -display :0' but to no avail.

What am i missing here?

lior

Posted 2013-11-13T17:35:29.197

Reputation: 1

Answers

0

The command you want is vncserver. This will start up an X11/VNC server for you. Then you can connect to the VNC server from a local host using "vncviewer". Several versions of these programs are available. I use vncserver from the package tightvncserver, and vncviewer from the package xtightvncviewer, which you can install from the command line using apt-get.

Vncserver is configured using ~/.vnc/xstartup. The .vnc directory will be created the first time you run vncserver, and a default copy of xstartup will be placed there. This is just a shell script that can run whatever X clients you want to start up when the server starts.

Also on the first starting of vncserver, you will be prompted for a password that must be supplied for the client to connect to the service.

If you do not specify otherwise, and there are no other instances of vncserver running on the host, the service will probably start as X11 display :1, and VNC will listen on port 5901. (The VNC port number is by default 5900 + the display number.) When you run the viewer, you must give the hostname and display number, as "vncviewer remotehost:1".

If you are connecting over a public network, it's highly recommended to tunnel the VNC protocol through ssh, and avoid exposing the server's port externally. That's a different subject, perhaps.

Guy Hillyer

Posted 2013-11-13T17:35:29.197

Reputation: 101