zoukankan      html  css  js  c++  java
  • Vncserver安装-Centos7

    Step:1 Make Sure the Desktop Packages are installed

    In order to setup VNC server first we make sure that Desktop is installed ,in My case i am using Gnome Desktop. If Gnome Desktop is not installed on your Linux machine then use the below command to install.

    [root@linuxtechi ~]# yum groupinstall "GNOME Desktop"
    Step:2 Install Tigervnc and other dependency Package.
    [root@linuxtechi ~]# yum install tigervnc-server xorg-x11-fonts-Type1
    Step:3 Setup VNC Server Configuration File.
    Copy the VNC config file “/lib/systemd/system/vncserver@.service” to the “/etc/systemd/system/vncserver@:<Port_Number>.service”.

    While Copying the VNC config file we can mention the port number on which we want VNC service to be listen. In my case i am using port 3 , it means VNC will listen on “5903”. So while Connecting to the VNC server We can specify port number as <IP_Address_VNC_Server:3> or <IP_Address_VNC_Server:5903>

    [root@linuxtechi ~]# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:3.service
    Step:4 Update the User’s Information in the Config File
    [root@linuxtechi ~]# vi /etc/systemd/system/vncserver@:3.service

    vnc-server-config-file

    Replace the “linuxtechi” user as per your requirement. In my case linuxtechi user will able to control and manage its desktop session using remote VNC clients.

    Set the Firewall Rule if firewall is enabled on your linux box.

    [root@linuxtechi ~]# firewall-cmd --permanent --zone=public --add-port=5903/tcp
    success
    [root@linuxtechi ~]# firewall-cmd --reload
    success
    [root@linuxtechi ~]#
    Step:5 Set the VNC password for the User.
    Switch to the user (linuxtechi) and run vncserver command to set the password as shown below :

    vncserver-passwd

    Start and Enable the VNC Service at boot.

    Execute below commands as root only.

    [root@linuxtechi ~]# systemctl daemon-reload
    [root@linuxtechi ~]# systemctl start vncserver@:3.service
    [root@linuxtechi ~]# systemctl enable vncserver@:3.service
    ln -s '/etc/systemd/system/vncserver@:3.service' '/etc/systemd/system/multi-user.target.wants/vncserver@:3.service'
    [root@linuxtechi ~]#
    Step:6 Access Remote Desktop Session.
    From Ubuntu Machine :

    ubuntu@localhost:~$ vncviewer 192.168.1.15:3

    Enter the VNC password that we have set in above step, after validating the authentication Remote Desktop session will start.

    From Windows Machine Using VNC Viewer

    Enter the VNC Server IP Address and Port Number and then Click on OK

    vncviewer

    Enter the VNC Password & then click on OK.

    vnc-password

    Desktop Session Will start after authentication.

    remote-desktop-vncviewer

  • 相关阅读:
    f12 接口自动刷新页面 来不及看接口信息 前端有没有传值
    order by 分组报错 shop 有三个字段 根据author 选出最大的price
    mybatis 动态sql
    正则 只有英文或者数字 长度6位以上 数字或者英文全部一样
    sql :1 :2
    前端Json数据,后台String接收,如何解析
    Json数据格式化
    LeetCode63. 不同路径 II
    LeetCode62. 不同路径
    LeetCode746. 使用最小花费爬楼梯
  • 原文地址:https://www.cnblogs.com/kakarott/p/10627421.html
Copyright © 2011-2022 走看看