红帽linux vnc配置文件,Redhat 8.3 vnc配置

redhat 8 系列vnc变动说明

The previous Tigervnc versions had a wrapper script called vncserver which could be run as a user manually to start Xvnc process. The usage was quite simple as you just run.

$ vncserver :x [vncserver options] [Xvnc options]

and that was it. While this was working just fine, there were issues when users wanted to start a Tigervnc server using systemd. For these reasons things were completely changed and there is now a new way how this all is supposed to work.

安装yum安装vnc package

tip:rhel8的光盘分为2个仓库:BaseOS和AppStream,必须都要配置上。这2个仓库都不能少。事先挂载光盘:

#mount /dev/cdrom /mnt/cdrom/

#cd /etc/yum.repos.d

编辑配置文件localyum.repo

[BaseOS]

name=BaseOS

baseurl=file:///run/media/root/RHEL-8-3-0-BaseOS-x86_64/BaseOS

enabled=1

gpgcheck=0

[AppStream]

name=AppStream

baseurl=file:///run/media/root/RHEL-8-3-0-BaseOS-x86_64/AppStream

enabled=1

gpgcheck=0

安装vnc

#yum install tigervnc -y

#yum install tigervnc-server tigervnc-server-module -y

Add a user mapping

With this you can map a user to a particular port.

#vim /etc/tigervnc/vncserver.users

:1=grid # 配置你的端口和用户

Configure Xvnc options

This file is for the default Xvnc configuration and will be applied to every user

unless any of the following applies:

The user has its own configuration in $HOME/.vnc/config

The same option with different value is configured in

‘vncserver-config-mandatory’ configuration file, which replaces the default configuration and has even a higher priority than the per-user configuration.

This option is for system administrators when they want to force particular Xvnc options.

#vim /etc/tigervnc/vncserver-config-defaults

session=gnome

alwaysshared

NOTE:

There is one important option you need to set and that option is the session you want to start. E.g when you want to start GNOME desktopwhich should match the name of a session desktop file from /usr/share/xsessions directory.

Set VNC password

You need to set a password for each user in order to be able to start the Tigervnc server. In order to create a password, you just run $vncpasswd:

#su - grid

$vncpasswd

Start the Tigervnc server

Finally you can start the server using systemd service.

systemctl start vncserver@:x # x为你为用户指定的端口

systemctl enable vncserver@:x

systemctl status vncserver@:1

6.At this point, the VNC service is up and running, verify that the VNC server is listening on TCP port 5901 using the netstat command.

#netstat -tlnp

c89277aa0f0975cfb8f6f0e071720a3f.png

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值