Steps to enable remote desktop access in CentOS/RHEL 7.
This can either be done via the following:
In the GUI
1. From an active desktop session, do the following:
Ciick on Applications -> System Tools -> Settings -> Sharing -> Screen Sharing and turn it on.
Using Command Line
1. Install vino-server package, vino is the VNC server in CentOS/RHEL to share the existing desktop session:
# yum install vino-server
2. Open the terminal on the existing gnome session, then run these commands to enable remote desktop for gnome:
$ gsettings set org.gnome.Vino enabled true $ gsettings set org.gnome.vino require-encryption false
3. Use vnc as the authentication method and set the vnc password:
$ gsettings set org.gnome.Vino authentication-methods "['vnc']"
Generate the vnc password for it, for example, use ‘vpasswd’ as the password:
$ echo -n 'vpasswd' | base64 dnBhc3N3ZA==
$ gsettings set org.gnome.Vino vnc-password 'dnBhc3N3ZA==' $ gsettings set org.gnome.Vino prompt-enabled false