Linux bean X11VNC 自動起動設定 flora
現在のID を確認
hide@hide:~$ id
uid=1000(hide) gid=1000(hide) groups=1000(hide),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),119(sambashare)
root@hide:~# id
uid=0(root) gid=0(root) groups=0(root)
rootでも、デスクトップにログインできるように、admグループに登録
hide@hide:~$ sudo gpasswd -a root adm
[sudo] password for hide:
ユーザ root をグループ adm に追加
hide@hide:~$
root@hide:~# vi /etc/pam.d/su
auth required pam_wheel.so group=adm
X11VNC インストール
root@hide:~# apt-get install x11vnc
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
x11vnc は既に最新バージョンです。
アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 382 個。
X11VNC 自動起動のパスワードファイルを作成
root@hide:~# x11vnc -storepasswd /etc/x11vnc.passwd
Enter VNC password:
Verify password:
Write password to /etc/x11vnc.passwd? [y]/n y
Password written to: /etc/x11vnc.passwd
X11VNC 自動起動の設定ファイルを新規作成
root@hide:~# 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.targe
------------------------
サービスxinetd 登録
root@hide:~# sysv-rc-conf xinetd on
root@hide:~# sysv-rc-conf --list xinetd
xinetd 2:on 3:on 4:on 5:on
---------------
サービスx11vnc 登録
root@hide:~# sysv-rc-conf x11vnc on
root@hide:~# sysv-rc-conf --list x11vnc
x11vnc 2:on 3:on 4:on 5:on
----------------
root@hide:~# reboot
root@hide:~#
hide@hide からのブロードキャスト・メッセージ
(/dev/pts/0) at 10:52 ...
The system is going down for reboot NOW!
******************************************************
192.168.2.102:0 にVNC 接続。 同じように設定してもダメ。
ターミナルコマンド
hide@hide:~$ x11vnc
###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@ @#
#@ ** WARNING ** WARNING ** WARNING ** WARNING ** @#
#@ @#
#@ YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!! @#
#@ @#
#@ This means anyone with network access to this computer @#
#@ may be able to view and control your desktop. @#
#@ @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
#@ @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@ @#
#@ You can create an x11vnc password file by running: @#
#@ @#
#@ x11vnc -storepasswd password /path/to/passfile @#
#@ or x11vnc -storepasswd /path/to/passfile @#
#@ or x11vnc -storepasswd @#
#@ @#
#@ (the last one will use ~/.vnc/passwd) @#
#@ @#
#@ and then starting x11vnc via: @#
#@ @#
#@ x11vnc -rfbauth /path/to/passfile @#
#@ @#
#@ an existing ~/.vnc/passwd file from another VNC @#
#@ application will work fine too. @#
#@ @#
#@ You can also use the -passwdfile or -passwd options. @#
#@ (note -passwd is unsafe if local users are not trusted) @#
#@ @#
#@ Make sure any -rfbauth and -passwdfile password files @#
#@ cannot be read by untrusted users. @#
#@ @#
#@ Use x11vnc -usepw to automatically use your @#
#@ ~/.vnc/passwd or ~/.vnc/passwdfile password files. @#
#@ (and prompt you to create ~/.vnc/passwd if neither @#
#@ file exists.) Under -usepw, x11vnc will exit if it @#
#@ cannot find a password to use. @#
#@ @#
#@ @#
#@ Even with a password, the subsequent VNC traffic is @#
#@ sent in the clear. Consider tunnelling via ssh(1): @#
#@ @#
#@ http://www.karlrunge.com/x11vnc/#tunnelling @#
#@ @#
#@ Or using the x11vnc SSL options: -ssl and -stunnel @#
#@ @#
#@ Please Read the documention for more info about @#
#@ passwords, security, and encryption. @#
#@ @#
#@ http://www.karlrunge.com/x11vnc/faq.html#faq-passwd @#
#@ @#
#@ To disable this warning use the -nopw option, or put @#
#@ 'nopw' on a line in your ~/.x11vncrc file. @#
#@ @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
###############################################################
18/08/2017 11:30:20 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 2746
18/08/2017 11:30:20 XOpenDisplay("") failed.
18/08/2017 11:30:20 Trying again with XAUTHLOCALHOSTNAME=localhost ...
18/08/2017 11:30:20
18/08/2017 11:30:20 *** XOpenDisplay failed. No -display or DISPLAY.
18/08/2017 11:30:20 *** Trying ":0" in 4 seconds. Press Ctrl-C to abort.
18/08/2017 11:30:20 *** 1 2 3 4
18/08/2017 11:30:24 *** XOpenDisplay of ":0" successful.
18/08/2017 11:30:24
18/08/2017 11:30:24 Using X display :0
18/08/2017 11:30:24 rootwin: 0x16e reswin: 0x600001 dpy: 0x864afe0
18/08/2017 11:30:24
18/08/2017 11:30:24 ------------------ USEFUL INFORMATION ------------------
18/08/2017 11:30:24 X DAMAGE available on display, using it for polling hints.
18/08/2017 11:30:24 To disable this behavior use: '-noxdamage'
18/08/2017 11:30:24
18/08/2017 11:30:24 Most compositing window managers like 'compiz' or 'beryl'
18/08/2017 11:30:24 cause X DAMAGE to fail, and so you may not see any screen
18/08/2017 11:30:24 updates via VNC. Either disable 'compiz' (recommended) or
18/08/2017 11:30:24 supply the x11vnc '-noxdamage' command line option.
18/08/2017 11:30:24
18/08/2017 11:30:24 Wireframing: -wireframe mode is in effect for window moves.
18/08/2017 11:30:24 If this yields undesired behavior (poor response, painting
18/08/2017 11:30:24 errors, etc) it may be disabled:
18/08/2017 11:30:24 - use '-nowf' to disable wireframing completely.
18/08/2017 11:30:24 - use '-nowcr' to disable the Copy Rectangle after the
18/08/2017 11:30:24 moved window is released in the new position.
18/08/2017 11:30:24 Also see the -help entry for tuning parameters.
18/08/2017 11:30:24 You can press 3 Alt_L's (Left "Alt" key) in a row to
18/08/2017 11:30:24 repaint the screen, also see the -fixscreen option for
18/08/2017 11:30:24 periodic repaints.
18/08/2017 11:30:24
18/08/2017 11:30:24 XFIXES available on display, resetting cursor mode
18/08/2017 11:30:24 to: '-cursor most'.
18/08/2017 11:30:24 to disable this behavior use: '-cursor arrow'
18/08/2017 11:30:24 or '-noxfixes'.
18/08/2017 11:30:24 using XFIXES for cursor drawing.
18/08/2017 11:30:24 GrabServer control via XTEST.
18/08/2017 11:30:24
18/08/2017 11:30:24 Scroll Detection: -scrollcopyrect mode is in effect to
18/08/2017 11:30:24 use RECORD extension to try to detect scrolling windows
18/08/2017 11:30:24 (induced by either user keystroke or mouse input).
18/08/2017 11:30:24 If this yields undesired behavior (poor response, painting
18/08/2017 11:30:24 errors, etc) it may be disabled via: '-noscr'
18/08/2017 11:30:24 Also see the -help entry for tuning parameters.
18/08/2017 11:30:24 You can press 3 Alt_L's (Left "Alt" key) in a row to
18/08/2017 11:30:24 repaint the screen, also see the -fixscreen option for
18/08/2017 11:30:24 periodic repaints.
18/08/2017 11:30:24
18/08/2017 11:30:24 XKEYBOARD: number of keysyms per keycode 7 is greater
18/08/2017 11:30:24 than 4 and 51 keysyms are mapped above 4.
18/08/2017 11:30:24 Automatically switching to -xkb mode.
18/08/2017 11:30:24 If this makes the key mapping worse you can
18/08/2017 11:30:24 disable it with the "-noxkb" option.
18/08/2017 11:30:24 Also, remember "-remap DEAD" for accenting characters.
18/08/2017 11:30:24
18/08/2017 11:30:24 X FBPM extension not supported.
18/08/2017 11:30:24 X display is capable of DPMS.
18/08/2017 11:30:24 --------------------------------------------------------
18/08/2017 11:30:24
18/08/2017 11:30:24 Default visual ID: 0x21
18/08/2017 11:30:24 Read initial data from X display into framebuffer.
18/08/2017 11:30:24 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4096
18/08/2017 11:30:24
18/08/2017 11:30:24 X display :0 is 32bpp depth=24 true color
18/08/2017 11:30:24
18/08/2017 11:30:24 Autoprobing TCP port
18/08/2017 11:30:24 Autoprobing selected TCP port 5900
18/08/2017 11:30:24 Autoprobing TCP6 port
18/08/2017 11:30:24 Autoprobing selected TCP6 port 5900
18/08/2017 11:30:24 listen6: bind: Address already in use
18/08/2017 11:30:24 Not listening on IPv6 interface.
18/08/2017 11:30:24 fb read rate: 33 MB/sec
18/08/2017 11:30:24 The X server says there are 10 mouse buttons.
18/08/2017 11:30:24 screen setup finished.
18/08/2017 11:30:24
18/08/2017 11:30:24 WARNING: You are running x11vnc WITHOUT a password. See
18/08/2017 11:30:24 WARNING: the warning message printed above for more info.
18/08/2017 11:30:24
The VNC desktop is: hide:0
PORT=5900
******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:
x11vnc -ncache 10 ...
One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching
18/08/2017 11:30:24 check_xrandr_event():
18/08/2017 11:30:24 Detected XRANDR event at location 'check_xevents':
18/08/2017 11:30:24 check_xrandr_event: no change detected.
18/08/2017 11:30:24 check_xrandr_event: enabling full XRANDR trapping anyway.
18/08/2017 11:30:38 Got connection from client 192.168.10.14
18/08/2017 11:30:38 other clients:
18/08/2017 11:30:38 Normal socket connection
18/08/2017 11:30:38 Disabled X server key autorepeat.
18/08/2017 11:30:38 to force back on run: 'xset r on' (3 times)
18/08/2017 11:30:38 incr accepted_client=1 for 192.168.10.14:51054 sock=11
18/08/2017 11:30:38 Client Protocol Version 3.4
18/08/2017 11:30:38 Protocol version sent 3.4, using 3.4
18/08/2017 11:30:38 Pixel format for client 192.168.10.14:
18/08/2017 11:30:38 32 bpp, depth 24, little endian
18/08/2017 11:30:38 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
18/08/2017 11:30:38 no translation needed
18/08/2017 11:30:38 rfbProcessClientNormalMessage: ignoring unsupported encoding type zlibhex
18/08/2017 11:30:38 Using compression level 6 for client 192.168.10.14
18/08/2017 11:30:38 Enabling X-style cursor updates for client 192.168.10.14
18/08/2017 11:30:38 Enabling full-color cursor updates for client 192.168.10.14
18/08/2017 11:30:38 Enabling cursor position updates for client 192.168.10.14
18/08/2017 11:30:38 Using image quality level 6 for client 192.168.10.14
18/08/2017 11:30:38 Using JPEG subsampling 0, Q79 for client 192.168.10.14
18/08/2017 11:30:38 rfbProcessClientNormalMessage: ignoring unsupported encoding type xorEnable
18/08/2017 11:30:38 Enabling LastRect protocol extension for client 192.168.10.14
18/08/2017 11:30:38 Enabling NewFBSize protocol extension for client 192.168.10.14
18/08/2017 11:30:38 rfbProcessClientNormalMessage: ignoring unsupported encoding type cacheEnable
18/08/2017 11:30:38 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8000)
18/08/2017 11:30:38 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8001)
18/08/2017 11:30:38 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8002)
18/08/2017 11:30:38 Using ZRLE encoding for client 192.168.10.14
18/08/2017 11:30:40 Pixel format for client 192.168.10.14:
18/08/2017 11:30:40 32 bpp, depth 24, little endian
18/08/2017 11:30:40 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
18/08/2017 11:30:40 no translation needed
18/08/2017 11:30:40 rfbProcessClientNormalMessage: ignoring unsupported encoding type zlibhex
18/08/2017 11:30:40 Using compression level 6 for client 192.168.10.14
18/08/2017 11:30:40 Enabling X-style cursor updates for client 192.168.10.14
18/08/2017 11:30:40 Enabling full-color cursor updates for client 192.168.10.14
18/08/2017 11:30:40 Enabling cursor position updates for client 192.168.10.14
18/08/2017 11:30:40 Using image quality level 6 for client 192.168.10.14
18/08/2017 11:30:40 Using JPEG subsampling 0, Q79 for client 192.168.10.14
18/08/2017 11:30:40 rfbProcessClientNormalMessage: ignoring unsupported encoding type xorEnable
18/08/2017 11:30:40 Enabling LastRect protocol extension for client 192.168.10.14
18/08/2017 11:30:40 Enabling NewFBSize protocol extension for client 192.168.10.14
18/08/2017 11:30:40 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8000)
18/08/2017 11:30:40 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8001)
18/08/2017 11:30:40 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8002)
18/08/2017 11:30:40 Switching from ZRLE to hextile Encoding for client 192.168.10.14
18/08/2017 11:30:40 client 1 network rate 683.4 KB/sec (1498.6 eff KB/sec)
18/08/2017 11:30:40 client 1 latency: 2.4 ms
18/08/2017 11:30:40 dt1: 2.0317, dt2: 0.0696 dt3: 0.0024 bytes: 1435112
18/08/2017 11:30:40 link_rate: LR_LAN - 2 ms, 683 KB/s
18/08/2017 11:30:40 client useCopyRect: 192.168.10.14 -1
18/08/2017 11:30:40 client_set_net: 192.168.10.14 0.0073
18/08/2017 11:30:40 created xdamage object: 0x600024
18/08/2017 11:30:40 copy_tiles: allocating first_line at size 33
18/08/2017 11:31:24 created selwin: 0x600025
18/08/2017 11:31:24 called initialize_xfixes()
実行中・・・
192.168.12.102:0 にVNC 接続 確認できた。
ターミナル停止で、切断。
デスクトップを閉じると、ターミナルジョブ終了。
***************************************************