Search code examples
linuxazureredhatrhel

Not able to see GUI using Gnome in RHEL 7.2 deployed in Azure


I am new to Linux environment. I have created a VM in Azure which has RHEL 7.2. I have installed Gnome 3.22.3 in it using Putty. I am NOT able to see the GUI for it. Is it possible to do it? I searched quite a bit, but, didn't find anything concrete. I followed these commands.

1) yum group list

2) a) yum groupinstall 'Server with GUI' (After downloading) Is this ok [y/d/N]: y

3) yum groupinstall 'X Window System' 'GNOME'

4) systemctl set-default graphical.target

5) gnome-shell --version

6) Reboot.

Still not able to see the GUI.


Solution

  • I am NOT able to see the GUI for it. Is it possible to do it?

    We can install xrdp on your VM, and add port 3389 to NSG inbound rules, then we can use mstsc to RDP it.

    sudo -s
    rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
    yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
    ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
    yum -y install xrdp tigervnc-server
    systemctl start xrdp.service
    netstat -antup | grep xrdp
    systemctl enable xrdp.service
    firewall-cmd --permanent --zone=public --add-port=3389/tcp
    firewall-cmd --reload
    

    Here a blog about how to enable GUI for centos 7 in classic module, please refer to this link.


    Update:

    Please follow this steps to install xrdp on your RHEL 7.2:

    1.Install Gnome on RHEL 7.2 first:

    yum group install "GNOME Desktop" "Graphical Administration Tools"
    yum groupinstall "Server with GUI"
    ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
    reboot
    

    2.Install and configure EPEL repository:

    rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    

    3.Add nux repository:

    rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
    

    Or Manual: vi /etc/yum.repos.d/xrdp.repo

    [xrdp]
    name=xrdp
    baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
    enabled=1
    gpgcheck=0
    

    4.Install xrdp:

    yum -y install xrdp tigervnc-server
    systemctl start xrdp.service
    

    Check it with this command:

    netstat -antup | grep xrdp
    
    tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1784/xrdp-sesman    
    tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1785/xrdp 
    

    Enable the service at system start up:

    systemctl enable xrdp.service
    

    Add port 3389:

    firewall-cmd --permanent --zone=public --add-port=3389/tcp
    firewall-cmd --reload
    

    Configure SELinux:

    chcon --type=bin_t /usr/sbin/xrdp
    chcon --type=bin_t /usr/sbin/xrdp-sesman
    

    By the way, we should add port 3389 to NSG inbound rules:

    enter image description here

    Here is my result:

    enter image description here