Remote App [part 1] Screen Capture with Rust
I was angry with my current M1 Air machine, don't take me wrong, it's a great machine, it's efficient, fast and lightweight when you need a machine with a good support for mobile.
But unfortunately my M1 just have a 8GB RAM and when I did a such programming activities, opening some DB manager, Document App and Browser, eventually it shows me a window alert that I need to close some apps to get more RAM and continue my work (ouch).
First time, the issue not really take my attention, until it repeatedly froze the screen and now become my first priority to solve.
You know, this situation happens mostly in urgent condition, like you making an online discussion, doing a presentation or just have some programming and boom, you cannot doing anything except restarting the machine.
Old but Gold 💻
Before using this M1, I'm happy to do my work using my old laptop. It runs Ubuntu, have big memory and many threads, and also good graphic card, it's never disappointing. But since this problem came out and I need some concrete solution, I am thinking how about to use this laptop to lift the heavy things ?
The Idea
Now I'm thinking about making this problem into an opportunity. Let's take a simple solution, how if I could remotely access the Linux machine via the M1 mac, doing the heavy thing.
For example, how if I can remotely connect via SSH to this linux computer and remote control the GUI so it's like a remote desktop for a simple version.
Learning the Engine
X Server
The first thing to learn if I want to make this implementation is to learn the X Server. X Server is one of the engine in linux that manages GUI, including the interaction and coordination between the "display" interpretation like our monitor and the "processor" like graphics card. This is the first and the oldest engine that supports our linux to have capability shows GUI under the hood.
The Protocol: X11
X11 is the direct companion to the X Server. It is the original display protocol that talk to the X Server in order to support the windowing system. It's has more than a decade exist and being a standard for GUI and applications on Unix-like system for many years.
The Protocol: Wayland
The second one is Wayland, this is the newer display protocol is the modern replacement for X11, it have a better security and efficient display server architecture that offers improved performance and security features, that is what its become the future choice of the linux windowing system.
Despite it offers many advantages, the adaptation of Wayland is slower than X11, because many applications and graphics-intensive software are still written for X11, and also some closed-source graphics drivers may not yet offer complete support for Wayland.
Conclusion
While these things are new to me, I think it's a good start to know the windowing system and try to experimenting with them. I will try to see and pick the choices, because supporting both X11 and Wayland seems to much for the beginning.