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
- On the remote pc:
ffmpeg libnotify-bin
You can use this ChimeraDesk
- In centralized mode
Local --> Public Server <-- Remote
(TW-style) if you can't/don't want to open ports on your router, or - In p2p mode
Local --> 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)
- On a public server you own, configure ssh gateway ports by adding
GatewayPorts clientspecified
tosshd_config
- On the remote computer you want to connect to, enable ssh and optionally create a key to be used to connect without password:
systemctl enable --now ssh
ssh-keygen -t rsa -f ~/.ssh/reverse-key
ssh-copy-id -i ~/.ssh/reverse-key <user@server>
- Now create a tunnel so you can forward all ssh requests (on port 8080 for example) to the ssh service running on your remote machine:
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 port22
on the remote computer NAT network (p2p mode). In such case-p 8080
must be omitted unless you decide to open port8080
to22
in your router (suggested).
- Connect to the remote computer and forward local requests on ports
12345
and12346
to localhost:
ssh -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.
- Launch
ChimeraDesk-x86_64.AppImage
on your local computer. - Launch
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 :)
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 -f x11grab -draw_mouse 0 -s $screensize -framerate 30 -i $DISPLAY -c:v libx264 -preset medium -profile high -pix_fmt yuv420p -tune zerolatency -b:v 2000K -minrate 2000K -maxrate 2000K -bufsize 512k -f mpegts tcp://127.0.0.1:12345
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
- Install build dependencies:
sudo apt install git gcc libmpv-dev libsdl2-dev libsdl2-ttf-dev
- Clone this repo:
git clone https://github.com/morrolinux/ChimeraDesk.git
- Move to the App directory:
ChimeraDesk/App/sdl/
- And build it with:
gcc -o main main.c $(pkg-config --libs --cflags mpv sdl2 SDL2_ttf) -std=c99
- Install
brew
- Install the required deps:
brew install mpv sdl2 sdl2_image sdl2_ttf pkg-config
- Clone this repo:
git clone https://github.com/morrolinux/ChimeraDesk.git
- Move to the App directory:
ChimeraDesk/App/sdl/
- And build it with:
gcc -o main main.c $(pkg-config --libs --cflags mpv sdl2 SDL2_ttf) -std=c99
If everything went fine (no errors) you can even build the AppImage:
cd AppImage && bash package.sh
- The result will be under
_out
.
- Move to the kvm/Appimage folder:
cd ChimeraDesk/kvm/AppImage
- And build everything into an AppImage like so:
bash package.sh
- The result will be under
_out
.