Ubuntu16 04 x11vnc 自動起動設定

*******************************************************************************************

 

x11vnc インストール 
root@HP-Z400:~# apt-get install x11vnc

xrdp をインストール
root@HP-Z400:~# apt-get install xrdp
 

X11VNC 自動起動のパスワードファイルを作成
root@HP-Z400:~# x11vnc -storepasswd /etc/x11vnc.passwd


X11VNC 自動起動の設定ファイルを新規作成
root@HP-Z400:~# vi /lib/systemd/system/x11vnc.service
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.passwd -rfbport 5900 -shared

[Install]
WantedBy=multi-user.target


---------------------------------------------------

root@HP-Z400:~# apt-get install xinetd

サービス管理プログラムをインストール
root@HP-Z400:~# apt install sysv-rc-conf

xinetd サービス自動起動設定
root@HP-Z400:~# sysv-rc-conf xinetd on

xinetd サービスの状態を確認
root@HP-Z400:~# sysv-rc-conf --list xinetd
xinetd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

xinetdサービスを再起動
root@HP-Z400:~# service xinetd restart

自動起動設定
root@HP-Z400:~# sysv-rc-conf x11vnc on

x11vnc サービスの状態を確認
root@HP-Z400:~# sysv-rc-conf --list x11vnc
x11vnc 2:on 3:on 4:on 5:on

init サービス起動リストを表示
root@HP-Z400:~# grep "start on" /etc/init/* | more

x11vnc サービス起動確認
root@HP-Z400:~# systemctl status x11vnc
● x11vnc.service - Start x11vnc at startup.
Loaded: loaded (/lib/systemd/system/x11vnc.service; enabled; vendor preset: enabled)
Active: active (running) since 土 2017-07-01 00:03:43 JST; 27min ago
Main PID: 1244 (x11vnc)
CGroup: /system.slice/x11vnc.service
├─1244 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /
└─1251 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /

7月 01 00:03:43 HP-Z400 systemd[1]: Started Start x11vnc at startup..
7月 01 00:03:44 HP-Z400 x11vnc[1244]: --- x11vnc loop: 1 ---
7月 01 00:03:44 HP-Z400 x11vnc[1244]: --- x11vnc loop: waiting for: 1251
7月 01 00:03:44 HP-Z400 x11vnc[1244]: disabling -bg in -loop mode
7月 01 00:03:49 HP-Z400 x11vnc[1244]: PORT=5900

root@HP-Z400:~# reboot

 

# x11vnc -auth guess -geometry 1270x900
192.168.1.4:0 にVNC 接続。 確認OK。
gnome デスクトップに切り替わる。root でも、切り替えOKだが、
文字入力切り替えは、「半角/全角」キーがつかえないので、右上メニューで、変換。

*************************************************************************************

投票数:2 平均点:10.00

 
Back to Top