UBUNTU OS 가상서버 서비스에 VNC 설치 및 설정 방법을 안내합니다.
- Gnome 설치
# apt-get install gnome-core - vnc4server 설치
# apt-get install vnc4server - vncserver 패스워드 설정
# vncserver
You will require a password to access your desktops.
Password: vnc 뷰어접속시 사용할 암호
Verify: vnc 뷰어접속시 사용할 암호
New '도메인:1 (root)' desktop is 도메인:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/도메인:1.log
# vnc4server -kill :1 - vnc 설정파일 수정
# cd /root/
# vi .vnc/xstartup- 수정전
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager & - 수정후
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
gnome-session --session=gnome-classic &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
- 수정전
- 권한변경
# chmod 755 /etc/X11/xinit/xinitrc - vnc server 실행
# vncserver -geometry 1024x600 - VNC viewer 프로그램으로 접속
- VNC viewer 다운 : https://www.tightvnc.com/download.php
- VNC viewer 다운 : https://www.tightvnc.com/download.php
- ※ vnc 접속시 다음과 같이 회색화면이 뜰 경우 해결방안
- 구동중인 vnc 종료
# vnc4server -kill :1 - vnc 설정파일 수정
# vi /root/.vnc/xstartup
------------------------------------
#!/bin/sh
def
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESSgnome-panel &
gnome-settings-daemon &
metacity &
nautilus &gnome-terminal &
------------------------------------ - vnc 실행
# vncserver -geometry 1024x600
- 구동중인 vnc 종료