• Stars
    star
    281
  • Rank 147,023 (Top 3 %)
  • Language Makefile
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple, fast and flexible DIY Remote Desktop software

ChimeraDesk

A simple, fast and flexible DIY Remote Desktop software

Glossary

  • remote computer : the one you want to connect to
  • local computer : the one you can physically type on
  • remote/pubblic server : (for reverse ssh configuration) it can be a VPS or generally any public server under no NAT network

Requirements

  • On the remote pc: ffmpeg libnotify-bin

Infrastructure

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.

Setup for centralized mode (optional)

If you need to connect between two NAT networks without opening ports on either side (like t.w. does)

  1. On a public server you own, configure ssh gateway ports by adding GatewayPorts clientspecified to sshd_config
  2. 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>
  1. 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

USAGE

In the following section we will refer to IP as:

  • Your public server IP if you are running in centralized mode
  • Your 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).
  1. Connect to the remote computer and forward local requests on ports 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.
  1. Launch ChimeraDesk-x86_64.AppImage on your local computer.
  2. 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 :)

Streaming desktop audio

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

Configuration is kept minimal and you get (arguably) reasonable default settings out of the box.

Network configuration

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.

FFMPEG streaming configuration

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.

Building Instruction

Example building on Ubuntu 18.04

Build the App on GNU/Linux

On Ubuntu 18.04 You need the latest libmpv-dev so add this PPA first: sudo add-apt-repository ppa:mc3man/bionic-media

  1. Install build dependencies: sudo apt install git gcc libmpv-dev libsdl2-dev libsdl2-ttf-dev
  2. Clone this repo: git clone https://github.com/morrolinux/ChimeraDesk.git
  3. Move to the App directory: ChimeraDesk/App/sdl/
  4. 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 run ./main TCP (or UDP, IF and only if you are on a local trusted network)

Now you can even build the AppImage:

  1. Install AppImage build dependencies:sudo apt install libfuse2 fuse3 file
  2. Move to the AppImage folder and build it:cd AppImage && bash package.sh
  3. The result will be under _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)

Build the App on MacOS

  1. Install brew
  2. Install the required deps: brew install gcc mpv sdl2 sdl2_image sdl2_ttf pkg-config
  3. Set the correct env var. according to your installed mpv version, like: export PKG_CONFIG_PATH=/System/Volumes/Data/opt/homebrew/Cellar/mpv/0.35.1_2/lib/pkgconfig/
  4. Clone this repo: git clone https://github.com/morrolinux/ChimeraDesk.git
  5. Move to the App directory: ChimeraDesk/App/sdl/
  6. And build it with: /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:

  1. First you'll need to export DYLD_LIBRARY_PATH=DYLD_LIBRARY_PATH:"/System/Volumes/Data/opt/homebrew/Cellar/mpv/0.35.1_2/lib/"
  2. Then run it like so: ./main.

Build the (Remote) KVM component

  1. Move to the kvm/Appimage folder: cd ChimeraDesk/kvm/AppImage
  2. And build everything into an AppImage like so: bash package.sh
  3. The result will be under _out.

More Repositories

1

simple-ehm

A simple tool for a simple task: remove filler sounds ("ehm") from pre-recorded speeches. AI powered.
Jupyter Notebook
225
star
2

i3expo-ng

Exposรจ for i3 WM. Fork of https://gitlab.com/d.reis/i3expo to fix crashes and improve features/usability
Python
157
star
3

mpradio

Morrolinux's Pirate radio (PiFmRDS / PiFmAdv implementation with Bluetooth and mp3 support) - Stream music to your car's FM radio or use it as a Bluetooth speaker via headphone jack
C++
106
star
4

subito-it-searcher

searcher for subito.it
Python
95
star
5

LinuxRices

dotfiles and stuff
Shell
88
star
6

mpradio-py

Morrolinux's Pirate radio (PiFmAdv wrapper with Bluetooth and mp3 support) - Stream music to your car's FM radio or use it as a Bluetooth speaker via headphone jack
Python
71
star
7

olive-distributed

Export Olive video editor projects in a distributed manner
Python
38
star
8

KindleCalendar

Selenium automation to screenshot calendar and view it on kindle
Python
32
star
9

autodestroy

Simple bash script to program the "autodestroy button" on your PC. This will wipe the entire disk on demand!
Shell
29
star
10

SurfaceLinuxGoodies

Configs and utilities for Linux users on a Surface
Shell
21
star
11

kde-config-migrator

A tool for migrating settings that PlasmaConfigSaver is not taking care of
Shell
12
star
12

pIRemote

IR universal remote using a Raspberry Pi
Python
9
star
13

logseq-md-export

Utility to export logseq pages as standard markdown
Python
8
star
14

Thinkpad_X1_Yoga_1st_Gen

Specific configurations for Linux 2 in 1 Thinkpad X1 Yoga (1st Gen)
Shell
5
star
15

dots

ryals files
Shell
5
star
16

LazyBackupSupervisor

Simple backup failure notification system with heartbeat approach. Just a POC, nothing worth being published really.
Python
3
star
17

pixelArk

Arkanoid game with fortunes and grid/level editor (Built in SFML)
C++
3
star
18

fastBuyApp

Simple and dummy "e-commerce"-like Android App using RecyclerView, Fragments and stuff. - just for academic purposes
Java
2
star
19

mpradio-remote

Bluetooth remote app for mpradio-py via rfcomm.
Java
2
star