Difference between revisions of "Set up a VNC server"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
m (Reverted edits by 221.178.182.61 (talk) to last revision by ThorstenStaerk)
 
(27 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[vnc]] allows you to connect to a remote computer's display over the [[network]]. It consists of a client and a server. The client is the viewer, the server provides the display. You can also allow browsers to view the server's desktop.
+
[[vnc]] allows you to [[control a computer]]'s display over the [[network]]. It consists of a client and a server. The client is the viewer, the server provides the display.
  
= server =
+
To read on [[find out your distribution]].
  
== for a web browser ==
+
= Ubuntu =
To configure vnc so it can be viewed from a web browser:
 
  
=== Fedora 14 ===
+
== Server ==
* install and start vncserver
+
To set up a VNC server with Ubuntu [[open a console]] and issue
  yum install tigervnc-server-applet nmap
+
  sudo apt-get update
  vncserver -httpport 80
+
  sudo apt-get install tightvncserver
* install xterm as vncserver will by default try to start xterm
 
yum install xterm
 
* verify the server is listening on port 80
 
# nmap localhost
 
 
Starting Nmap 5.21 ( http://nmap.org ) at 2010-11-28 09:57 UTC
 
Nmap scan report for localhost (127.0.0.1)
 
Host is up (0.000015s latency).
 
Not shown: 996 closed ports
 
PORT    STATE SERVICE
 
22/tcp  open  ssh
 
'''80/tcp  open  http'''
 
5901/tcp open  vnc-1
 
6001/tcp open  X11:1
 
* stop the firewall
 
/etc/init.d/iptables stop
 
chkconfig iptables off
 
* point your browser to your server
 
  
=== Ubuntu 8.04 (hardy) ===
+
To start it issue the [[command]]
Read and follow http://packages.ubuntu.com/hardy/all/tightvnc-java/download, then
+
  vncserver
sudo apt-get install tightvnc-java xfonts-base
 
  vncserver -httpport 80
 
  
=== Ubuntu 9.10 ===
+
To stop it issue the command
  sudo apt-get install tightvnc-java tightvncserver
+
  sudo killall Xtightvnc
vncserver -httpport 80
 
  
=== Ubuntu 10.04 ===
+
== Client ==
Errors like
+
Command
  Xtightvnc[6159]: segfault at e28116d8 ip 00007fdee17c635e sp 00007fffc36b0930 error 4 in libc-2.11.1.so[7fdee177d000+17a000]
+
  vncviewer ''myserver'':1
  
=== Ubuntu 10.10 ===
+
= Hints =
  cat >>/etc/apt/sources.list<<EOF
+
* as desktop environment consider XFCE. It is lightweight yet provides a clearly guided user experience. Your .vnc/xstartup could look like this:
  deb http://ubuntu.mirror.cambrium.nl/ubuntu/ maverick main multiverse
+
  #!/bin/sh
  EOF
+
  xfce4-session
  apt-get update
+
To get this working you must install xfce4. You can also [[install gnome]] and set .vnc/xstartup to be
  apt-get install tightvnc-java
+
  #!/bin/sh
  apt-get install tightvncserver
+
  gnome-session
vncserver -httpport 80
+
 
results in errors like
+
= TroubleShooting =
Xtightvnc[3508]: segfault at 8475f6d8 ip 00007f5e837127aa sp 00007fff06913a70 error 4 in libc-2.12.1.so[7f5e836c9000+17a000]
+
 
 +
== fonts do not work ==
 +
Fonts e.g. in nautilus do not work. For CentOs 6:
 +
  yum install bitmap-miscfixed-fonts
 +
 
 +
== only black window shown ==
 +
For SUSE:
 +
  /etc/init.d/xdm restart
 +
 
 +
= See also =
 +
* [[a Linux desktop in a website]]
 +
* [[Terminal Server]]
 +
* http://www.online-marketwatch.com/HttpTunnel4vnc/
 +
* http://www.novell.com/support/kb/doc.php?id=7004096

Latest revision as of 19:05, 24 November 2015

vnc allows you to control a computer's display over the network. It consists of a client and a server. The client is the viewer, the server provides the display.

To read on find out your distribution.

Ubuntu

Server

To set up a VNC server with Ubuntu open a console and issue

sudo apt-get update
sudo apt-get install tightvncserver

To start it issue the command

vncserver

To stop it issue the command

sudo killall Xtightvnc

Client

Command

vncviewer myserver:1

Hints

  • as desktop environment consider XFCE. It is lightweight yet provides a clearly guided user experience. Your .vnc/xstartup could look like this:
#!/bin/sh
xfce4-session

To get this working you must install xfce4. You can also install gnome and set .vnc/xstartup to be

#!/bin/sh
gnome-session

TroubleShooting

fonts do not work

Fonts e.g. in nautilus do not work. For CentOs 6:

yum install bitmap-miscfixed-fonts

only black window shown

For SUSE:

/etc/init.d/xdm restart

See also