-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall_vnc.sh
59 lines (46 loc) · 1.56 KB
/
install_vnc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Install and configure VNC for Ubuntu Linux
#
# Tested on Ubuntu 12.04
# Tested on Virtualization type: OpenVZ, KVM
#
# Script by: Asim Zeeshan
# http://www.asim.pk/
#
# Original Posted by VPS6.NET (https://vps6.net)
# Post URL: http://www.lowendtalk.com/discussion/1065/how-to-install-vnc-w-gnome-on-debian-vps
#
apt-get clean all
apt-get update
apt-get upgrade
# ##########################################################
# Install GNOME
apt-get install gnome-desktop-environment
# ##########################################################
# Install required fonts
apt-get install xfonts-100dpi
apt-get install xfonts-100dpi-transcoded
apt-get install xfonts-75dpi
apt-get install xfonts-75dpi-transcoded
apt-get install xfonts-base
# ##########################################################
# Install TightVNCServer and setup VNC password
apt-get install tightvncserver
tightvncserver :1
# ##########################################################
# Kill VNC instance at 5901 to continue with the configuration
tightvncserver -kill :1
# ##########################################################
# Edit the xstartup file
cat > ~/.vnc/xstartup <<END
#!/bin/shxrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &
gnome-session &
END
# ##########################################################
# Finally, start the first VNC session
# Its accessible at XXX.XXX.XXX.XXX:5901 with the same
# password that you have set in the config above
tightvncserver -geometry 1024x768 :1