安装VNC+xfce4桌面
yum install epel-release
yum groupinstall Xfce -y
yum install tigervnc-server -y
vncserver 设置密码 只读选N 生成配置文件
vi /root/.vnc/xstartup 把 /etc/X11/xinit/xinitrc注释掉然后加上 startxfce4 保存退出
vncpasswd 修改密码
vncserver :1 启动vncserver
vncserver -list 查看
vncserver -kill :1 关闭
netstat -tupln 查看vncserver占用端口
设置VNC开机启动
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service
或者再增加一个窗口:
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:2.service
vi /lib/systemd/system/vncserver@:1.service 设置用户root相关参数
修改[Service]
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i -geometry 1024x768"
PIDFile=/root/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
systemctl daemon-reload 更新systemctl以使其生效
systemctl start vncserver@:1.service 启动
systemctl stop vncserver@:1.service 关闭
设置为开机自动启动;
systemctl enable vncserver@:1.service
设置VNC中文
vi /etc/locale.conf
LANG=zh_CN.UTF-8
添加中文字体
yum -y install cjkuni-ukai-fonts
yum -y install google-noto-sans-simplified-chinese-fonts.noarch
挂载Rclone并且开启缓存
可直接用aria2等下载工具直接选择网盘挂载目录进行下载,会先下载到本地.cache目录然后自动转移到网盘目录。
rclone mount onedrive: /home/onedrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 --vfs-cache-mode writes