User Tools

Site Tools


Sidebar

vps:vps4th2nd_10

This is an old revision of the document!


ブラウザでの desktop 接続

prisoner desktop にブラウザで接続する。

web 設定

pkg

pkgにて、以下を導入。

  • novnc
  • bash
  • git

WebSockify 設定

WebSockify のダウンロードと設定する。

  • websockify をダウンロードするため、launch.sh を一度実行する。
    # cd /usr/local/libexec/novnc/utils
    # chmod 744 launch.sh
    # ./launch.sh
    <中略>
    Filed to start WebSockets proxy
    #
  • /usr/local/libexec/novnc/utils/websockify/run 修正
    #!/usr/bin/env python3.6 (python を python3.6 に修正)

novnc 設定

novnc 向け設定を行う。

  • /usr/local/etc/rc.d/novnc を作成する。
    #!/bin/sh
    #
    
    # PROVIDE: novnc
    
    . /etc/rc.subr
    
    name="novnc"
    rcvar=novnc_enable
    command="/usr/local/libexec/novnc/utils/launch.sh"
    command_args=${novnc_options}
    
    load_rc_config $name
    run_rc_command "$1"
  • /etc/rc.conf を編集する。
    inetd_enable="YES"
    novnc_enable="YES"
    novnc_option="--vnc 192.168.100.2:5901"
apache 設定

WebSockify ディレクトリを組み込む。

  • /usr/local/etc/apache24/extra/httpd-ssl.conf を設定する。
    Alias /<パス> /usr/local/libexec/novnc
    <Directory /usr/local/libexec/novnc>
         AllowOverride all
         Order allow,deny
         Allow from all
         Require all granted
    </Directory>
    • <パス> は推測しにくいものにしたほうが良い?

desktop 設定

pkg

pkgにて、以下を導入。

  • xdm
  • xsm

xdm

prisner desktop 起動時に xdm を起動する。

  • /usr/local/etc/rc.d/xdm を作成
    #!/bin/sh
    #
    
    # PROVIDE: xdm
    
    . /etc/rc.subr
    
    name="xdm"
    rcvar=xdm_enable
    command="/usr/local/bin/xdm"
    
    load_rc_config $name
    run_rc_command "$1"
  • /etc/rc.conf を編集
    xdm_enable="YES"
  • /usr/local/lib/X11/xdm/Xaccess を編集
    *   #any host can get a login window
  • /usr/local/lib/X11/xdm/Xservers を編集
    #:0 local /usr/local/bin/X :0
  • /usr/local/lib/X11/xdm/xdm-config を編集
    ! DisplayManager.requestPort:   0

TigerVNC

TigerVNC を inetd で制御する。

  • /etc/services を編集
    vnc     5901/tcp
  • /etc/inetd.conf を編集
    vnc    stream  tcp  nowait  nobody  /usr/local/bin/Xvnc  Xvnc -inetd -query localhost -once -geometry <横>x<縦> -securitytypes=none
vps/vps4th2nd_10.1554005707.txt.gz · Last modified: 2019/06/16 15:16 (external edit)