ubuntu20.10安装VNCserver服务

vnc提供远程桌面服务,下面介绍下详细安装步骤

执行apt-get update更新下

apt-get update

安装桌面环境

sudo apt install xfce4 xfce4-goodies

安装vncserver

apt install tightvncserver

启动vncserver服务并初始化

root@wxj-virtual-machine:~# vncserver

You will require a password to access your desktops.

Password:

Verify: 

Would you like to enter a view-only password (y/n)?

xauth:  file /root/.Xauthority does not exist

New 'X' desktop is wxj-virtual-machine:1

Creating default startup script /root/.vnc/xstartup

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/wxj-virtual-machine:1.log

这时候远程登录看到桌面环境是一片空白

配置下vncserver的参数

vncserver -kill :1

mv ~/.vnc/xstartup ~/.vnc/xstartup.bak

vim ~/.vnc/xstartup

增加以下内容

#!/bin/bash

xrdb $HOME/.Xresources

startxfce4 &

增加执行权限

chmod +x ~/.vnc/xstartup

重新启动vncserver服务之后重新链接查看,成功看到桌面环境

vncserver -kill :1

vncserver

连接信息


看到如下界面成功配置


©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容