우분투 tightvnc 설치방법.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gnome-settings-daemon gnome-terminal metacity nautilus
sudo apt-get install gnome-panel tightvncserver
$vncserver
Password:
Verify:
비밀번호 입력.
view-only password (y/n)
n
저장되는곳.
~/.vnc/passwd
sudo nano ~/.vnc/xstartup
이거
#!/bin/sh
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
또는
(우분투 16.04 에서 회색화면으로 보여짐.)
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
에서 # 제거...
그리고 리부팅 시 자동으로 시작되도록 파일생성.
nano /etc/init.d/tightvnc
#!/bin/bash
### BEGIN INIT INFO
# Provides: vncserver
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
PATH="$PATH:/usr/bin/"
export USER="{유저 이름}"
DISPLAY="1"
DEPTH="16"
GEOMETRY="1280x1024"
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
저장 후.
$ sudo chmod +x /etc/init.d/tightvnc
$ sudo update-rc.d tightvnc defaults
파일 문제가 없다면 스크립트 등록이 된다..
리부팅 후 vncview 로 접속 확인.
ddns ip 뒤에 ::5901 로 접속
최초 입력했던 비밀번호 입력.
'리눅스' 카테고리의 다른 글
centos 7 http.conf (0) | 2018.03.27 |
---|---|
리눅스 홈폴더 영문이름으로 변경 (0) | 2017.12.23 |
우분투 코드이그나이터 index.php 사라지게 하기. (0) | 2017.08.31 |
리눅스 우분투 cli 부팅 (0) | 2017.07.24 |
vi 편집기 (0) | 2017.07.17 |