본문 바로가기
2014.09.18 19:38

How to setup VNC server

조회 수 2007 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
How to setup VNC server

1. Install VNC server and XFCE 4 desktop
sudo apt-get -y install ubuntu-desktop tightvncserver xfce4 xfce4-goodies

2. Add a VNC user and set its password
sudo adduser vnc
sudo vncpasswd vnc

3. Install VNC as a service
sudo vi /etc/init.d/vncserver
------------------8<--------------------
#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="vnc"
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 "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;

restart)
$0 stop
$0 start
;;
esac
exit 0
------------------8<--------------------

4. edit xstartup file
sudo mkdir /home/vnc/.vnc
sudo vi /home/vnc/.vnc/xstartup
------------------8<--------------------
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
startxfce4 &
------------------8<--------------------
sudo chown -R vnc. /home/vnc/.vnc && sudo chmod +x /home/vnc/.vnc/xstartup
sudo sed -i 's/allowed_users.*/allowed_users=anybody/g' /etc/X11/Xwrapper.config
sudo chmod +x /etc/init.d/vncserver && sudo service vncserver start
netstat -ntlp

5. Add your VNC server to automatically start on reboot
sudo update-rc.d vncserver defaults


Title
List of Articles
번호 제목 글쓴이 날짜 조회 수
33 Samba Server Configuration in Ubuntu 14.04 LTS Hojung 2014.12.31 1942
32 Install GUI on Ubuntu server 14.04 Trusty Tahr Hojung 2014.12.10 3122
» How to setup VNC server Hojung 2014.09.18 2007
30 install and start ssh server Hojung 2014.02.20 2234
29 if you don't see .bashrc in user dir in ubuntu Hojung 2011.10.15 6419
28 Installing Java Run-Time Environment(JRE) on Ubuntu 11.10 Hojung 2011.10.12 6449
27 Install Adobe Flash Player in Ubuntu 11.10 Hojung 2011.10.06 6452
26 Installing Dropbox in Ubuntu 11.10 Hojung 2011.10.06 6280
25 우분투 터미널 폰트 바꾸기 Hojung 2011.09.24 9987
24 How to Convert WMV to MP4 With Ubuntu Hojung 2011.04.27 10869
23 Ubuntu - Executing a script at startup and shutdown Hojung 2011.04.26 11192
22 Changing the resolution of a VNC session in linux Hojung 2011.04.26 9659
21 How to Install a VNC Server in Ubuntu Hojung 2011.04.25 11161
20 Disable popup notifications Hojung 2011.02.10 10660
19 Install Curl in PHP5 and Apache Hojung 2010.12.31 12364
18 [Ubuntu] Pidgin 에러. The certificate for omega.contacts.msn.com ... Hojung 2010.11.22 10408
17 [Ubuntu] sendmail 설정 및 트러블슈팅 Hojung 2010.11.15 13245
16 [Ubuntu] How To Change The Time Zone in Ubuntu Linux Hojung 2010.11.08 9697
15 [Ubuntu] 간단한 Xpressengine 설치 환경 만들기 Hojung 2010.11.02 10671
14 [Ubuntu] Firefox Java Plugin 설치하기 Hojung 2010.08.12 10508
Board Pagination ‹ Prev 1 2 Next ›
/ 2

Designed by sketchbooks.co.kr / sketchbook5 board skin

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5