1 安装xfce4
sudo apt install xfce4 xfce4-goodies
ssh安装什么都不会弹出。
2 安装tigervnc
sudo apt install tigervnc-standalone-server
3 配置
创建&编辑 ~/.vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startxfce4
权限
chmod u+x ~/.vnc/xstartup
4 启动,重启系统
vncserver
vncserver -kill :1
最好在这里重启一次系统
5配置开机启动
创建&编辑/etc/systemd/system/[email protected]
username为启动的用户名
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
User=username
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver :%i -localhost no -geometry 1920x1080 -alwaysshared -fg
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
开机启动
sudo systemctl daemon-reload
sudo systemctl enable [email protected]
标签:bin,sudo,xfce4,kill,vncserver,tigervnc,ubuntu22 From: https://www.cnblogs.com/xaoyxc/p/17041180.html