Set up Guacamole on your VPS, then you can access your VPS from anywhere, all you need to access your desktops is a web browser.

Refers :
http://guacamole.incubator.apache.org/doc/gug/installing-guacamole.html
http://guacamole.incubator.apache.org/doc/0.9.1/gug/installing-guacamole.html

My VPS is ubuntu 16.04.

1. Buiding guacamole-server from source.

install required dependencies
$ sudo apt-get install libcairo2-dev libjpeg-turbo8-dev libpng12-dev libossp-uuid-dev libavcodec-dev libavutil-dev libswscale-dev libfreerdp-dev libpango1.0-dev     libssh2-1-dev     libtelnet-dev libvncserver-dev libpulse-dev  libssl-dev libvorbis-dev libwebp-dev
$ sudo apt-get install autoconf libtool

setup jdk and mav
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
$ sudo update-java-alternatives -s java-8-oracle
$ export JAVA_HOME=/usr/lib/jvm/java-8-oracle/
$ wget http://apache.tt.co.kr/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz
$ tar xzvf apache-maven-3.5.0-bin.tar.gz
$ export PATH=~/apache-maven-3.5.0/bin:$PATH

setup tomcat too, please refer to:
http://lengerrong.blogspot.com/2017/06/how-to-setup-tomcat-on-ubuntu.html

build
$ git clone git://github.com/apache/incubator-guacamole-server.git
$ incubator-guacamole-server
$ autoreconf -fi
$ ./configure --with-init-dir=/etc/init.d
$ make
$ sudo make install
$ sudo ldconfig

At this point, everything is installed, but guacd is not running. You will need to run guacd in order to use Guacamole once the client components are installed as well.

2.Building guacamole-client from source too.
$ git clone git://github.com/apache/incubator-guacamole-client.git
$ cd incubator-guacamole-client
$ mvn package

[INFO] guacamole-common ................................... SUCCESS [ 31.031 s]
[INFO] guacamole-ext ...................................... SUCCESS [ 15.395 s]
[INFO] guacamole-common-js ................................ SUCCESS [ 19.751 s]
[INFO] guacamole .......................................... SUCCESS [02:06 min]
[INFO] guacamole-auth-cas ................................. SUCCESS [ 27.770 s]
[INFO] guacamole-auth-duo ................................. SUCCESS [ 18.470 s]
[INFO] guacamole-auth-header .............................. SUCCESS [  7.781 s]
[INFO] guacamole-auth-jdbc ................................ SUCCESS [  0.575 s]
[INFO] guacamole-auth-jdbc-base ........................... SUCCESS [ 19.919 s]
[INFO] guacamole-auth-jdbc-mysql .......................... SUCCESS [ 15.506 s]
[INFO] guacamole-auth-jdbc-postgresql ..................... SUCCESS [ 14.984 s]
[INFO] guacamole-auth-jdbc-dist ........................... SUCCESS [  6.495 s]
[INFO] guacamole-auth-ldap ................................ SUCCESS [ 13.026 s]
[INFO] guacamole-auth-noauth .............................. SUCCESS [  7.274 s]
[INFO] guacamole-example .................................. SUCCESS [  5.699 s]
[INFO] guacamole-playback-example ......................... SUCCESS [  2.777 s]
[INFO] guacamole-client ................................... SUCCESS [ 14.757 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS


By default, VNC support will be installed as a dependency of the guacamole package. If you want SSH or RDP support, you will need to install libguac-client-ssh0 or libguac-client-rdp0 manually:
# apt-get install libguac-client-ssh0 libguac-client-rdp0
 
3. Deploying Guacamole
$ sudo mkdir /etc/guacamole
$ sudo cp guacamole/doc/example/user-mapping.xml /etc/guacamole
$ cat /etc/guacamole/guacamole.properties 
# Hostname and port of guacamole proxy
guacd-hostname: localhost
guacd-port:     4822

# Auth provider class (authenticates user/pass combination, needed if using the provided login screen)
auth-provider: net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider
basic-user-mapping: /etc/guacamole/user-mapping.xml
$ cp guacamole/target/guacamole-0.9.12-incubating.war 
/var/lib/tomcat9/webapps/guacamole.war
$ sudo mkdir /usr/lib/tomcat9/.guacamole/
$ ln -s /etc/guacamole/guacamole.properties /usr/lib/tomcat9/.guacamole/     
$ sudo vim /etc/guacamole/user-mapping.xml 
  uncomment below content: 
    <authorize username="USERNAME" password="PASSWORD">
        <protocol>vnc</protocol>
        <param name="hostname">localhost</param>
        <param name="port">5900</param>
        <param name="password">VNCPASS</param>
    </authorize> 
 USERNAME and PASSWORD are for used for login guacamole.
 VNCPASS are the password for vncserver. 
 please modify for your case.    <authorize username="errong.leng" password="ucLinux1">
        <protocol>vnc</protocol>
        <param name="hostname">localhost</param>
        <param name="port">5901</param>
        <param name="password">ucLinux1</param>
    </authorize> 



4. Start guacd and tocmat
$ sudo /etc/init.d/guacd restart
$ sudo /var/lib/tomcat9/bin/startup.sh

OK. everything is done.
let's access via web browser.
 
 
 
 sudo apt-get install guacamole-tomcat 
by the way, since I use google cloud compute engine.
And tomcat use 8080 as default port, so we have to add a new firewall policy.
 
 
Important : You have to setup vncserver on your VPS first, since guacamole does not include it.
please refer to :
https://lengerrong.blogspot.com/2017/06/setup-your-xfce-desktop-and-vncserver.html

After you login, your desktop will show in your browser.


 




How to fix compile error on VPS : virtual memory exhausted: Cannot allocate memory

The root cause is no swap on your vps.
Let's mkswap by ourself.

errong_leng@vvs:~$ sudo su -
root@vvs:~# umask 077
root@vvs:~# mkdir /usr/img/
root@vvs:~# dd if=/dev/zero of=/usr/img/swap bs=1024 count=2048000
2048000+0 records in
2048000+0 records out
2097152000 bytes (2.1 GB, 2.0 GiB) copied, 54.9435 s, 38.2 MB/s
root@vvs:~#  mkswap /usr/img/swap      
Setting up swapspace version 1, size = 2 GiB (2097147904 bytes)
no label, UUID=c435f1d9-9b3a-40a8-8624-b7a09adca9d5
root@vvs:~# swapon /usr/img/swap

Once you do not need swap, you can delete it.
Since it will use about 2G of your vps disk.
#swapoff /usr/img/swap
#rm /usr/img -rf
这是要应验先知以赛亚的话,说: (马太福音 12:17 和合本)
This was to fulfill what was spoken through the prophet Isaiah:  (Matthew 12:17 NIV)
看哪!我的仆人,我所拣选、所亲爱、心里所喜悦的,我要将我的灵赐给他;他必将公理传给外邦。 (马太福音 12:18 和合本)
“Here is my servant whom I have chosen, the one I love, in whom I delight; I will put my Spirit on him, and he will proclaim justice to the nations.  (Matthew 12:18 NIV)
他不争竞,不喧嚷;街上也没有人听见他的声音。 (马太福音 12:19 和合本)
He will not quarrel or cry out; no one will hear his voice in the streets.  (Matthew 12:19 NIV)
压伤的芦苇,他不折断;将残的灯火,他不吹灭;等他施行公理,叫公理得胜。 (马太福音 12:20 和合本)
A bruised reed he will not break, and a smoldering wick he will not snuff out, till he has brought justice through to victory.  (Matthew 12:20 NIV)
外邦人都要仰望他的名。 (马太福音 12:21 和合本)
In his name the nations will put their hope.”  (Matthew 12:21 NIV)


那时,耶稣说:“父啊,天地的主,我感谢你!因为你将这些事向聪明通达人就藏起来,向婴孩就显出来。  (马太福音 11:25 和合本)
At that time Jesus said, “I praise you, Father, Lord of heaven and earth, because you have hidden these things from the wise and learned, and revealed them to little children. (Matthew 11:25 NIV)
父啊,是的,因为你的美意本是如此。  (马太福音 11:26 和合本)
Yes, Father, for this is what you were pleased to do. (Matthew 11:26 NIV)
一切所有的,都是我父交付我的;除了父,没有人知道子;除了子和子所愿意指示的,没有人知道父。  (马太福音 11:27 和合本)
“All things have been committed to me by my Father. No one knows the Son except the Father, and no one knows the Father except the Son and those to whom the Son chooses to reveal him. (Matthew 11:27 NIV)
凡劳苦担重担的人可以到我这里来,我就使你们得安息。  (马太福音 11:28 和合本)
“Come to me, all you who are weary and burdened, and I will give you rest. (Matthew 11:28 NIV)
我心里柔和谦卑,你们当负我的轭,学我的样式;这样,你们心里就必得享安息。  (马太福音 11:29 和合本)
Take my yoke upon you and learn from me, for I am gentle and humble in heart, and you will find rest for your souls. (Matthew 11:29 NIV)
因为我的轭是容易的,我的担子是轻省的。” (马太福音 11:30 和合本)
For my yoke is easy and my burden is light.” (Matthew 11:30 NIV)


务要寻求 神

“你们祈求,就给你们;寻找,就寻见;叩门,就给你们开门。 (马太福音 7:7 和合本)
“Ask and it will be given to you; seek and you will find; knock and the door will be opened to you. (Matthew 7:7 NIV)
因为凡祈求的,就得着;寻找的,就寻见;叩门的,就给他开门。 (马太福音 7:8 和合本)
For everyone who asks receives; the one who seeks finds; and to the one who knocks, the door will be opened. (Matthew 7:8 NIV)
你们虽然不好,尚且知道拿好东西给儿女,何况你们在天上的父,岂不更把好东西给求他的人吗? (马太福音 7:11 和合本)
If you, then, though you are evil, know how to give good gifts to your children, how much more will your Father in heaven give good gifts to those who ask him! (Matthew 7:11 NIV)
所以,无论何事,你们愿意人怎样待你们,你们也要怎样待人,因为这就是律法和先知的道理。” (马太福音 7:12 和合本)
So in everything, do to others what you would have them do to you, for this sums up the Law and the Prophets. (Matthew 7:12 NIV)
“你们要进窄门。因为引到灭亡,那门是宽的,路是大的,进去的人也多; (马太福音 7:13 和合本)
“Enter through the narrow gate. For wide is the gate and broad is the road that leads to destruction, and many enter through it. (Matthew 7:13 NIV)
引到永生,那门是窄的,路是小的,找着的人也少。” (马太福音 7:14 和合本)
But small is the gate and narrow the road that leads to life, and only a few find it. (Matthew 7:14 NIV)


务要完全

“你们听见有话说:‘当爱你的邻舍,恨你的仇敌。’ (马太福音 5:43 和合本)
“You have heard that it was said, ‘Love your neighbor and hate your enemy.’ (Matthew 5:43 NIV)
只是我告诉你们,要爱你们的仇敌,为那逼迫你们的祷告。 (马太福音 5:44 和合本)
But I tell you, love your enemies and pray for those who persecute you, (Matthew 5:44 NIV)
这样就可以作你们天父的儿子;因为他叫日头照好人,也照歹人;降雨给义人,也给不义的人。 (马太福音 5:45 和合本)
that you may be children of your Father in heaven. He causes his sun to rise on the evil and the good, and sends rain on the righteous and the unrighteous. (Matthew 5:45 NIV)
你们若单爱那爱你们的人,有什么赏赐呢?就是税吏不也是这样行吗? (马太福音 5:46 和合本)
If you love those who love you, what reward will you get? Are not even the tax collectors doing that? (Matthew 5:46 NIV)
你们若单请你弟兄的安,比人有什么长处呢?就是外邦人不也是这样行吗? (马太福音 5:47 和合本)
And if you greet only your own people, what are you doing more than others? Do not even pagans do that? (Matthew 5:47 NIV)
所以,你们要完全,像你们的天父完全一样。” (马太福音 5:48 和合本)
Be perfect, therefore, as your heavenly Father is perfect. (Matthew 5:48 NIV)


不要忧虑

“所以我告诉你们,不要为生命忧虑吃什么,喝什么;为身体忧虑穿什么。生命不胜于饮食吗?身体不胜于衣裳吗? (马太福音 6:25 和合本)
“Therefore I tell you, do not worry about your life, what you will eat or drink; or about your body, what you will wear. Is not life more than food, and the body more than clothes? (Matthew 6:25 NIV)
你们看那天上的飞鸟,也不种,也不收,也不积蓄在仓里,你们的天父尚且养活它。你们不比飞鸟贵重得多吗? (马太福音 6:26 和合本)
Look at the birds of the air; they do not sow or reap or store away in barns, and yet your heavenly Father feeds them. Are you not much more valuable than they? (Matthew 6:26 NIV)
你们哪一个能用思虑使寿数多加一刻呢(或译:使身量多加一肘呢) ? (马太福音 6:27 和合本)
Can any one of you by worrying add a single hour to your life ? (Matthew 6:27 NIV)
何必为衣裳忧虑呢?你想野地里的百合花怎么长起来;它也不劳苦,也不纺线。 (马太福音 6:28 和合本)
“And why do you worry about clothes? See how the flowers of the field grow. They do not labor or spin. (Matthew 6:28 NIV)
然而我告诉你们,就是所罗门极荣华的时候,他所穿戴的,还不如这花一朵呢! (马太福音 6:29 和合本)
Yet I tell you that not even Solomon in all his splendor was dressed like one of these. (Matthew 6:29 NIV)
你们这小信的人哪!野地里的草今天还在,明天就丢在炉里, 神还给它这样的妆饰,何况你们呢! (马太福音 6:30 和合本)
If that is how God clothes the grass of the field, which is here today and tomorrow is thrown into the fire, will he not much more clothe you—you of little faith? (Matthew 6:30 NIV)
所以,不要忧虑说,吃什么?喝什么?穿什么? (马太福音 6:31 和合本)
So do not worry, saying, ‘What shall we eat?’ or ‘What shall we drink?’ or ‘What shall we wear?’ (Matthew 6:31 NIV)
这都是外邦人所求的。你们需用的这一切东西,你们的天父是知道的。 (马太福音 6:32 和合本)
For the pagans run after all these things, and your heavenly Father knows that you need them. (Matthew 6:32 NIV)
你们要先求他的国和他的义,这些东西都要加给你们了。 (马太福音 6:33 和合本)
But seek first his kingdom and his righteousness, and all these things will be given to you as well. (Matthew 6:33 NIV)
所以,不要为明天忧虑,因为明天自有明天的忧虑;一天的难处一天当就够了。” (马太福音 6:34 和合本)
Therefore do not worry about tomorrow, for tomorrow will worry about itself. Each day has enough trouble of its own. (Matthew 6:34 NIV)


fixed: embedded-redis: Unable to run on macOS Sonoma

Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...