不能够吧
这是我在debian下用的bash脚本,你可以试试
不过我这个默认是起在localhost得先ssh端口转发才能连
function setup_vncserver {
apt install -y xterm xfonts-base xfonts-scalable tightvncserver icewm sakura fonts-hack fonts-firacode fonts-wqy-microhei
runuser -l myusername -c 'mkdir .vnc'
runuser -l myusername -c 'touch .vnc/xstartup'
cat > /home/myusername/.vnc/xstartup <<END
#!/bin/bash
xrdb \$HOME/.Xresources
exec /etc/X11/Xsession
END
chmod +x /home/myusername/.vnc/xstartup
runuser -l myusername -c 'vncpasswd'
cat > /etc/systemd/system/vncserver@.service <<END
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
User=myusername
Group=myusername
WorkingDirectory=/home/myusername
PIDFile=/home/myusername/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver :%i -depth 24 -geometry 1280x800 -localhost -interface lo -nolisten tcp
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
END
systemctl daemon-reload
systemctl enable vncserver@9.service
systemctl start vncserver@9.service
}
【 在 allegro 的大作中提到: 】
: Tried two days, tons of HOWTO pages read with google.
: still not working.
: It's not like the good old days everything is just to apt-get install.
: ...................
--
FROM 221.220.133.*