Centos Config X11vnc Service Toturial

This article I will show you, tools which enabled you to access remote Desktop on machines running Centos/RHEL.

Before beginning, you only need SSH access to your server and rights to install software. You need to know root password or permissions to use sudo. All commands will work on every CentOS server 5/6/7. Before start, you need to install desktop environment to your server.

Installing GNOME Desktop environment

GNOME is the most popular environment in the latest distributions of Linux. It's the default environment in CentOS 7 GUI, Fedora 21 and later and Ubuntu 17.10.

To install GNOME Desktop run the following commands.

# yum -y groups install "GNOME Desktop"

After the installation run the command below to start the GNOME environment.

#startx

The GNOME environment will start thereafter. After a reboot, The GNOME setup will prompt you to set up the following parameters.

  • System Language
  • Keyboard type
  • System Language
  • Online Accounts
  • System Language

Finally, click on Start using CentOs 7. The default GNOME Desktop is the GNOME Classic. If you prefer to use the GNOME shell, type the following command before the startx command.

#echo "exec gnome-session" >> ~/.xinitrc
#startx

gnome desktop environment

Alternatively, after a reboot, you can select your preferred environment at the login screen.

desktop environment options

gnome desktop environment

After startx, next, follow these steps.

#yum groupinstall 'GNOME Desktop Environment' 'X Window System'

x11vnc – simples of this 3 methods to get remote access. VNC stands for Virtual Network Computing) is a very useful network graphics protocol.

Perhaps you need to enable EPEL (Extra Packages for Enterprise Linux) repository. Run

#yum -y install epel-release

Now we can install x11vnc. This command will install server and solve all dependencies.

#yum -y install x11vnc

Setting x11vnc passwd and then we will protect server with password.

# x11vnc passwd
# x11vnc -storepasswd /etc/x11vnc.pass

Config DM script ,for example gdm.

#vi /etc/gdm/Init/Default

Add the following content.

/usr/bin/x11vnc -nap -bg -many -repeat -clear_keys -rfbauth /etc/x11vnc.pass -rfbport 5900

Add / edit KillInitClients option in the [daemon] section to:add new line before exit(0).

#vi /etc/gdm/custom.conf
KillInitClients=false

whichever returns a value is the one you a running.  CentOS7's default firewall is not iptables, but firewalle. You need to install iptable-service.

//First check to see if iptables is installed
#service iptables status
 
//Install iptables
#yum install -y iptables
 
//Update iptables
#yum update iptables 
 
//Install iptables-services
#yum install iptables-services

Disable/stop the firewalld service that comes with firewalld.

#systemctl stop firewalld
#systemctl mask firewalld

Now, config iptables.

#iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 5900 -j ACCEPT 
#service iptables save
#service iptables restart

Reboot the machine, all complete, enjoy!

More detail,please click here:5 Tools to Enable Remote Desktop Access on RHEL/CentOS 7

reference links:

https://www.robhq.com/2017/09/x11vnc-with-redhat-centos-7/

https://linoxide.com/linux-how-to/install-configure-vnc-server-centos-7-0

How to Install and Configure VNC Server on CentOS 7

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在CentOS 7上安装x11vnc,可以按照以下步骤进行操作: 1. 打开终端并使用以下命令安装xfce4桌面环境: ``` yum groupinstall "X Window System" "Xfce" ``` 2. 安装x11vnc软件包,可以使用以下命令: ``` yum install x11vnc ``` 3. 在安装x11vnc之前,我们可以使用x11vnc命令来创建一个存储密码的文件。使用以下命令设置密码并将其存储在/etc/x11vnc.pass文件中: ``` x11vnc -storepasswd 123456 /etc/x11vnc.pass ``` 4. 启动x11vnc服务,你可以使用以下命令: ``` x11vnc -rfbauth /etc/x11vnc.pass -display :0 -forever -shared ``` 通过按照以上步骤,你可以成功在CentOS 7上安装和配置x11vnc。请注意,确保你已经安装了X Window System和xfce4桌面环境。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [命令行版 Centos 7 虚拟机安装 xfce4 桌面 + x11vnc + novnc](https://blog.csdn.net/qq_20919883/article/details/127692673)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Centos 7 安装VNC步骤(亲试成功)](https://download.csdn.net/download/e_wsq/9622815)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [centos7 x11vnc配置](https://blog.csdn.net/u010749410/article/details/122696356)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值