vnc server configuration (ubuntu 14.04 lts server)

Post on 12-Jul-2015

1.206 Views

Category:

Engineering

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Sachin Kamal | SGSITS | Indore

Virtual

Network

Computing

Introduction

VNC stands for Virtual Network Computing.

VNC is that remote controlled technology which allows a user to view and interact with one computer (the "server") using a simpleprogram (the "viewer") on another computer anywhere on the Internet or LAN.

Background

Olivetti & Oracle Research Lab (ORL) at Cambridge in the UK, in 1998.

The name 'Virtual Network Computer/Computing' originates from ORL's work on a thin client called the Videotile which also used the RFB protocol. This was essentially an LCD with a pen input and a fast ATM connection to the network. At the time, network computer was commonly used as a synonym for 'thin client'. VNC is essentially a software-only (i.e. virtual) version of this network computer.

VNC differs from other remote display systems in three crucial ways: It is fully cross-platform. It is small and simple. The Windows viewer, for

example, is about 150K in size and can be run directly from a floppy.

It is open-source! You can download it, use it, and redistribute it under the terms of the GNU General Public License.

Differences

The VNC server is the program on the machine that shares its screen. The server passively allows the client to take control of it.

The VNC client (or viewer) is the program that watches, controls, and interacts with the server. The client controls the server.

The VNC protocol (RFB protocol) is very simple, based on one graphic primitive from server to client ("Put a rectangle of pixel data at the specified X,Y position") and event messages from client to server.

operations

RFB (“remote framebuffer”) is a protocol for remote access to graphical user interfaces. Since, It works at the framebuffer level, so it is applicable to all windowing systems and applications, including X11, Windows 3.1/95/NT and Macintosh.

The remote endpoint where the user sits (the display pluskeyboard and/or pointer) is called the RFB client. The endpoint where changes to the framebuffer originate

(i.e. the windowing system and applications) is known as the RFB server.

Remote Frame Buffer

RFB is truly a “thin client” protocol. The emphasis in the design of the RFB protocol is to make very few requirements of the client. In this way, clients can run on the widest range of hardware, and the task of implementing a client is made as simple as possible.

The protocol also makes the client stateless. If a client disconnects from a given serverand subsequently reconnects to that same server,

the state of the user interface is preserved.

Remote Frame Buffer

Writing an VNC viewer or client is a simple task, as it should be for any thin-client system. It requires only a reliable transport (usually TCP/IP), and a way of displaying pixels (either directly writing to the frame buffer, or going through a windowing system).

VNC clients exist for all flavors of Unix, Windows, Macintosh, Java and for smaller hand-held appliances.

VNC clients I viewers

Writing an VNC server is slightly harder than writing a client for a number of reasons. The protocol is designed to make the client as simple as

possible, so it is usually up to the server to perform any necessary translations.

For example, the server must provide pixel data in the format the client wants.

There are servers Unix, Windows and Macintosh platforms A Unix machine can run a number of Xvnc servers for different users, each of which represents a distinct VNC desktop.

Each VNC desktop is like a virtual X display, with a root window on which several X applications can be displayed.

VNC Servers

The Windows server (WinVNC) is a little more difficult to create, because there are fewer places to insert hooks into the system to monitor display updates, and a less clearly-defined model of multiuser operation.

Servers simply mirrors the real display to a remote client, which means that the server is not 'multiuser'. It does, however, provide the primary user of a PC with remote access to their desktop.

VNC Servers

RealVNC http://www.realvnc.com/ TightVNC http://www.tightvnc.com/ UltraVNC http://ultravnc.sourceforge.net/ Chicken of the VNC

http://sourceforge.net/projects/cotvnc/ OSXvnc

http://www.redstonesoftware.com/vnc.html

Servers viewers&

Installation & ConfigurationInstallationGet logged in system as root user on the shell. Now install the VNC-server.

1. Update the packages:$ apt-get update

2. Install gnome GUI:$ apt-get install gnome-core

3. Install VNC Server:$ apt-get install vnc4server

Installation & ConfigurationUser and VNC Password ConfigurationNow at this step new user is to be added to the system and made vnc server configured. 1. Add user to the system:

$ adduser username 2. Switch to the created user:

$ su – username 3. Start VNC Server:

$ vncserver

Server Startup Script Configuration 1. Make backup of default xstartup script:

$ cp ~/.vnc/xstartup ~/.vnc/xstartup.bak 2. Open xstartup script with nano editor

$ nano ~/.vnc/xstartup

Installation & Configuration

#!/bin/shunset SESSION_MANAGERunset DBUS_SESSION_BUS_ADDRESSstartxfce4 &[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &

Error Log What went wrong:

TightVNC – Compatibility issues with Fedora, Xwindows. Attempted to install new version of Xwindows. Resulted in failed GUI.

RealVNC – Packages from RealVNC were misleading. Only installed server but not the viewer. Had to download packages for viewer from fedora mirror. http://fedora.officepark.ru/3/i386/os/Fedora/RPMS/?C=N;O=D

Notes Windows vs. Linux

When logging into Windows machines viewer only requires IP address.

Linux requires IP address plus session number. (i.e. 134.198.161.104:1)

Computer can be logged out (not turned off) but vncserver must be running.

References http://www.realvnc.com - RealVNC http://www.tightvnc.com - TightVNC http://fedoranews.org/tchung/vnc/index.shtml -

Fedora News.org

Sacchin Kamal, SGSITS, Indore

top related