文章目录
忘记密码
删除 ~/.vnc/passwd,然后重新启动 vnc 即可。也可以使用 vncpasswd 命令修改。
Setting locale failed
启动 vnc 服务时,在 Ubuntu16.04 上遇到下面的错误,在 Ubuntu 18.04 上没有遇到。
perl: warning: Setting locale failed.
LANGUAGE = (unset),
LC_ALL = (unset),
解决办法是在 ~/.bashrc 文件下添加
export LANGUAGE=en_US.utf8
export LC_ALL=en_US.utf8
然后使 ~/.bashrc 文件生效
source ~/.bashrc
找不到字体
~/.vnc 文件夹下会出现 log 和 pid 文件。在 log 文件中
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/Type1/, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!
其实这些错误并没有什么影响,不需要解决。
如果非要解决:这条路径并不存在,系统中字体所在路径位于 /usr/share/fonts/X11,但没有Speedo,75dpi 和 100dpi,后两个可以安装
sudo apt install xfonts-75dpi xfonts-100dpi
然后手动建文件夹 /usr/X11R6/lib/X11,创建软链接
cd /usr/X11R6/lib/X11
sudo ln -s /usr/share/fonts/X11 fonts