A simple, fast and flexible DIY Remote Desktop software
remote computer
: the one you want to connect tolocal computer
: the one you can physically type onremote/pubblic server
: (for reverse ssh configuration) it can be a VPS or generally any public server under no NAT network ffmpeg libnotify-bin
You can use this ChimeraDesk
Local --> Public Server <-- Remote
(TW-style) if you can't/don't want to open ports on your router, orLocal --> Remote
(RDP-style) if you can/want to open ports on your router.If you need to connect between two NAT networks without opening ports on either side (like t.w. does)
GatewayPorts clientspecified
to sshd_config
systemctl enable --now ssh
ssh-keygen -t rsa -f ~/.ssh/reverse-key
ssh-copy-id -i ~/.ssh/reverse-key <user@server>
ssh -i ~/.ssh/reverse-key -Ng -R *:8080:localhost:22 user@server
In the following section we will refer to IP
as:
Your public server IP
if you are running in centralized modeYour remote computer IP
if you can open port 22
on the remote computer NAT network (p2p mode).
In such case -p 8080
must be omitted unless you decide to open port 8080
to 22
in your router (suggested).12345
and 12346
to localhost:
ssh -R 12344:127.0.0.1:12344 -R 12345:127.0.0.1:12345 -R 12346:127.0.0.1:12346 user@IP -p 8080
# This will also yield a shell you can use on step 3.
ChimeraDesk-x86_64.AppImage
on your local computer.ChimeraDesk-KVM-x86_64.AppImage
on your remote computer That's it!
You should now be able to see and control the remote screen.
Please note that the 'viewer' AppImage can be twice as heavy on the CPU compared to the natively built executable. Check the building instructions if you care about efficiency. It's simple enough and performs much better :)
Due to video + audio muxing latency issues, desktop audio needs to be carried over by a separate stream. At this point in time I've not integrated this feature in the ChimeraDesk App yet, but the KVM already streams the audio on port 12344 and you can listen to it with ffplay.
BEFORE running the KVM component on the remote side, start listening on your local (controller) machine with:
ffplay -f s16le -ar 44100 -ac 2 -probesize 32 -analyzeduration 0 -sync ext "tcp://0.0.0.0:12344?listen"
There you go!
Configuration is kept minimal and you get (arguably) reasonable default settings out of the box.
Everything is binding on localhost
to let the user tunnel the traffic the way he/she wants.
In order to maximize flexibility and keep the code simple, the application should not care about network configuration and encryption.
Plese note that encryption is not provided so SSH (or equivalent encrypted tunneling such as VPN) is highly recommended.
On first launch, the application writes a default ffmpeg command line under ~/.config/hprdpvideo.sh
:
echo $BASHPID > /tmp/ffmpeg.pid; ffmpeg ... some other stuff ....
You are free to change anything at your will, but be sure to keep the echo $BASHPID > /tmp/ffmpeg.pid;
prefix as it's needed for terminating ffmpeg via UI dialog.
Please note that this file is considered user configuration and therefore never updated again by the program. If you expirience issues with the video configuration, try removing it before restarting the kvm component.
Example building on Ubuntu 18.04
On Ubuntu 18.04
You need the latest libmpv-dev
so add this PPA first: sudo add-apt-repository ppa:mc3man/bionic-media
sudo apt install git gcc libmpv-dev libsdl2-dev libsdl2-ttf-dev
git clone https://github.com/morrolinux/ChimeraDesk.git
ChimeraDesk/App/sdl/
gcc -o main main.c $(pkg-config --libs --cflags mpv sdl2 SDL2_ttf) -std=c99
If everything went fine (no errors) you can run ./main TCP
(or UDP, IF and only if you are on a local trusted network)
Now you can even build the AppImage:
sudo apt install libfuse2 fuse3 file
cd AppImage && bash package.sh
_out
.You can run the ChimeraDesk AppImage executable with ./ChimeraDesk.Appimage - TCP
(or UDP, IF and only if you are on a local trusted network)
brew
brew install gcc mpv sdl2 sdl2_image sdl2_ttf pkg-config
export PKG_CONFIG_PATH=/System/Volumes/Data/opt/homebrew/Cellar/mpv/0.35.1_2/lib/pkgconfig/
git clone https://github.com/morrolinux/ChimeraDesk.git
ChimeraDesk/App/sdl/
/opt/homebrew/bin/gcc-13 -o main main.c $(pkg-config --libs --cflags mpv sdl2 SDL2_ttf) -std=c99
If everything went fine (no errors) you can now run the program:
export DYLD_LIBRARY_PATH=DYLD_LIBRARY_PATH:"/System/Volumes/Data/opt/homebrew/Cellar/mpv/0.35.1_2/lib/"
./main
.cd ChimeraDesk/kvm/AppImage
bash package.sh
_out
.