https://gitee.com/src-openeuler/tigervnc/blob/openEuler-24.03-LTS-SP1/HOWTO.md
按照仓库说明使用 systemd 启动 tigerVNC 时,发现用户目录下的 .vnc 目录的 SELinux 上下文与 /usr/lib/systemd/system/vncserver@.service 中的 SELinux 上下文不匹配,
内容为:SELinuxContext=system_u:system_r:vnc_session_t:s0
使用文档中的命令 restorecon -RFv /home/username/.vnc 后,仍无法修改。
尝试使用 semanage 修改:
semanage fcontext -a -t vnc_session_t “/home/username/.vnc(/.*)?”
提示:ValueError: 类型 vnc_session_t 无效,必须是文件或设备类型
将 SELinux 设置为宽容模式后仍然无法启动服务,
关闭 SELinux 后服务可正常运行。