This is a bash script to get GUI in a google cloud instance. This script works on any instance whether it is free or not (even in cloud shell instance).
XFCE works fine in any instance while other desktop environments breaks in free instance due to lack of gpu.
This script was tested only with google cloud instances but should work fine with any other cloud service providers.
If you have problems with the script, feel free to create an issue