- 仓库
- 基础仓库,切到develop分支
- vncserver
- 构建 https://www.kasmweb.com/docs/latest/how_to/building_images.html
build
- 修改build脚本生成证书用如下命令
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout ${HOME}/.vnc/self.pem -out ${HOME}/.vnc/self.pem -subj "/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=localhost/emailAddress=none@none.none" -extensions EXT -config <( printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
- 需要修改workspaces-core-images 的dockerfile文件里的环境变量 START_XFCE4=1,很多为0
- 修改src/common/startup_scripts/vnc_startup.sh 里的openssl生成的命令为1步所示,加上-extensions EXT -config <( printf “[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth”) 参数。
- 在镜像里加入src/common/startup_scripts/vnc_startup.sh 加入miniserve启动在8080端口
function miniservestartup (){
miniserve -o -u -a kasm_user:$VNC_PW --tls-cert ${HOME}/.vnc/self.pem --tls-key ${HOME}/.vnc/self.pem $HOME/Desktop/Uploads &
KASM_PROCS['miniservestartup']=$!
}
miniservestartup
- 使用jsmpeg播放声音。需要下载nodejs, 安装ws 包