openEuler配置vnc

环境:
OS:oe2203sp4

1.安装DDE桌面环境
[root@hxl ~]# dnf -y install dde
[root@hxl ~]# systemctl set-default graphical.target
[root@hxl ~]# reboot

 

2.安装vnc
[root@hxl ~]#dnf install tigervnc-server -y

 

3.关闭防火墙
systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service
vi /etc/selinux/config
set "SELINUX=disabled" and comment the rest lines.

 

4.添加用户

复制代码
[root@cos8 yum.repos.d]# vi /etc/tigervnc/vncserver.users
# TigerVNC User assignment
#
# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
#
# :2=andrew
# :3=lisa
:1=oracle
复制代码

 

5.修改

复制代码
[root@19c ~]# more /etc/tigervnc/vncserver-config-defaults
## Default settings for VNC servers started by the vncserver service
#
# Any settings given here will override the builtin defaults, but can
# also be overriden by ~/.vnc/config and vncserver-config-mandatory.
#
# See HOWTO.md and the following manpages for more details:
#     vncsession(8) Xvnc(1)
#
# Several common settings are shown below. Uncomment and modify to your
# liking.

# session=gnome
# securitytypes=vncauth,tlsvnc
# geometry=2000x1200
# localhost
# alwaysshared
session=gnome
复制代码

 

6.配置VNC密码
su - oracle
[oracle@cos8 ~]$ vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? y
Password:
Verify:

 

7.修改文件,加入如下内容

su - oracle
vi /home/oracle/.vnc/xstartup

复制代码
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
exec dbus-launch startdde &
复制代码

 

8.启动服务

发现启动失败,需要重启服务后再次启动才能成功.
[root@cos8 yum.repos.d]#systemctl start vncserver@:1
[root@cos8 yum.repos.d]#systemctl status vncserver@:1

 

9.查看端口是否启动

[root@19c ~]# ss -nlp|grep 5901
tcp   LISTEN 0      5                                         0.0.0.0:5901             0.0.0.0:*     users:(("Xvnc",pid=2200,fd=6))                                             
tcp   LISTEN 0      5                                            [::]:5901                [::]:*     users:(("Xvnc",pid=2200,fd=7))

 

posted @   slnngk  阅读(633)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示