ifconfig eth0 172.16.12.21 netmask 255.255.0.0
route add default gw 172.16.0.250
安装脚本
#!/bin/sh
mount -o remount,rw /
yum install -y nodejs npm
npm config set electron_mirror=https://cdn.npm.taobao.org/dist/electron/
sudo npm -g install electron --unsafe-perm=true
运行脚本
#!/bin/sh
/home/start_xorg.sh &
/home/start_openbox.sh &
/home/start_xcompmgr.sh &
#sleep 5
export DISPLAY=:0
electron --no-sandbox ./前端目录
如:
#/bin/sh
export DISPLAY=:0
electron --no-sandbox /usr/local/gui/ &