Google Cloud Platform(GCP): Access Linux Server using GUI running in GCP instance using Windows Remote Desktop Connection.

Prashanta Paudel (prashantapaudel.com.np)
Tech-Guides
Published in
3 min readNov 30, 2020

--

The first thing any new DevOps engineer would like to do in Google Cloud Platform is to spin up a Linux server in GCP and access it using the remote desktop connection.

The primary difficulty is that the Linux server started in GCP is in CLI mode and thus have no GUI of its own. So, we need to install GUI first using the command

#yum -y groupinstall "GNOME Desktop" && systemctl set-default graphical.target && shutdown -r now

This will install GUI and make it as a default startup option and then restart the machine.

$ sudo yum install xrdp tigervnc-server

This will install tigervnc server in CentOS. Tigervnc-server is a program which executes an Xvnc server and starts parallel sessions of Gnome or other Desktop Environment on the VNC desktop.

After installation login to the system using the account which you want to grant xrdp access to connect remotely. For instance, if you want root user to have access via remote desktop then change the password for that user as default is blank in default.

# sudo su
# passwd
# systemctl start xrdp

xrdp should be listening on 3389. You can confirm this by using the command.

# netstat -antup | grep xrdptcp        0      0 0.0.0.0:3389            0.0.0.0:*…

--

--