Step One — Install Desktop Environment and VNC Server
$ sudo apt-get update
$ sudo apt-get install xfce4 xfce4-goodies tightvncserver
Step Two — Configure VNC Server
$ sudo mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
$ sudo nano ~/.vnc/xstartup
----------------------------------------
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
----------------------------------------
$ sudo chmod +x ~/.vnc/xstartup
Step Three — Create a VNC Service File
$ sudo nano /etc/init.d/vncserver
------------------------------------------------------------------------
#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="user"
DISPLAY="1"
DEPTH="16"
GEOMETRY="1024x768"
OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"
. /lib/lsb/init-functions
case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;
stop)
log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;
restart)
$0 stop
$0 start
;;
esac
exit 0
------------------------------------------------------------------------
$ sudo chmod +x /etc/init.d/vncserver
$ sudo service vncserver start
PS:how-to-install-and-configure-vnc-on-ubuntu-14-04,
Similar Posts:
- Ubuntu Tomcat Server:insserv: warning: script ‘tomcat’ missing LSB tags and overrides
- Raspberry pie: How to Solve Mongodb installation error
- Docker Cannot Start: Failed to start Docker Application Container Engine
- Solution to the error of MySQL: unrecognized service (CentOS)
- E09 Error: sudo: effective uid is not 0, is sudo installed setuid root?
- Configuring Google Android test station for Ubuntu
- SSH Error: (ssh: connect to host localhost port 22: Connection refused)
- Mysql:ERROR 1698 (28000): Access denied for user ‘root’@’localhost’
- [Solved] Docker Starup Error: Failed to start Docker Application Container Engine.
- ERROR: [pool www] cannot get uid for user ‘localhost.localdomain’ [Solved]