This is the twentieth ninth part of the Availability Anywhere series. For your convenience you can find other parts in the table of contents in Part 1 – Connecting to SSH tunnel automatically in Windows
There are so many protocols for remote access. Why not use all of them at the same time? Let’s see how.
Table of Contents
Back to basics
“Remote access” is very misleading as it often means different things between users. We already covered that in the part 27 where I described session management, input and output, screen geometry, and more.
This results in no single solution that would fit all. In my case it’s the following:
- RDP is great as it is the fastest, has great quality, supports keyboard and touch properly even in nested sessions, supports custom geometry, and handles incoming sound. However, it can’t be shared between many devices in parallel.
- VNC is great as it’s fast, has good enough quality, can be shared between devices, and supports watching regions of the geometry. It also works in browser on nearly any device. But it doesn’t deal well with keyboard (especially in nested sessions), doesn’t support audio, and requires the session to exist in the machine.
- RustDesk is cool in terms of keyboard handling and picture quality, but it’s too slow for the day to day work. It’s cool for ad-hoc connections and can be shared between devices. However, it requires the session and doesn’t deal with UAC that great.
- NoMachine is similar to RustDesk but has worse keyboard support.
- vSpatial is fast enough and supports VR, but can’t be shared between devices.
I could go on and on with listing pros and cons of each solution, but it should be clear that there is no single solution that would work for all my needs.
So what can we do about that? Let’s use all of them in parallel.
Requirements at a glance
Before figuring out what to do, let’s see what we’d like to achieve. I’d like to have the following:
- Being able to connect remotely to a machine from multiple devices in parallel (laptops, smartphones, VR goggles, etc.)
- Supporting 3+ monitors
- Keeping the session alive even when I’m not connected
- Supporting sound in both directions and camera feed going into the remote machine
- Being able to copy and paste text easily. Similarly for files
- Adapting the screen to my physical device (it should stretch if needed to support fullscreen)
- Remote machine is Windows
It’s quite a lot and there is no single solution doing all of that. Let’s build it step by step.
Configuring the session
First, we have to create a session in the remote machine. There are generally two ways.
If the remote machine is a virtual machine that we can control, then we can connect to it via KVM (like basic session in Hyper-V or other mechanisms built into hypervisors). This creates the regular CONSOLE session which we can now adapt in any way we need. To create virtual screens, we can use any fork of IddSampleDriver that will support the resolution we need etc.
If the remote machine is not a VM that we can control, then let’s still do the same. Just create your own VM, configure it accordingly, and then RDP into the remote machine.
To keep the session alive even if you are not connected to it, just keep your VM somewhere where it doesn’t turn off, like Azure VM or any other VPS.
Connecting in parallel
Now we can connect to the remote machine using many solutions that connect to the existing session. The question is: how to run all of them together?
The trick is to make windows transparent. For instance, first connect to the remote machine over VNC and make the client full screen. Next, connect to the remote machine using RustDesk and make the client full screen again. Finally, use something like See Through Windows to make RustDesk fully transparent. This way you can use keyboard and clipboard via RustDesk and watch the screen via VNC.
Nothing stops you from connecting with more solutions like this. You can also fork the See Through Windows and automate it any way you wish.
What’s more, you can use your local machine to create multiple virtual desktops and have different set of clients on different desktops.
Summary
Making windows transparent is a nice hack that lets you use multiple applications in parallel. You could obviously fork RustDesk or VNC clients and adjust features as you need.