Light and fast program for remote control of a computer.

Overview

DeskX - Remote control program

About

The project was created for its own use within the home local network (you can use DeskX over the internet using port forwarding via ssh, with such a connection you only need to use the TCP protocol). I have a server at home with a large number of Linux virtual machines to which I needed remote access. All remote software I've tried had their problems - e.g., scrolling in the browser, dragging windows, etc. For this reason, a project was created that focuses on the fastest possible data transfer over the local network. The project works on all operating systems with X11.

You can leave your opinion - I am happy to get any feedback ;)

Functionality

  • Selection of the range of the difference between adjacent pixels to ensure compression (from 0 to 255)
  • Multiple Commands: Server Side Shutdown, Remote Control
  • Ability to create a palette of colors
  • Ability to set an authorization password
  • There is a choice of data transfer protocol (TCP or UDP)
  • Fullscreen or windowed mode
  • Two separate streams for transferring screen data and events

An example of working with compression

Video example of how the program works (compression parameter is 16, protocol for events and screen is TCP, gigabit LAN is used)

Compression algorithm

The first step is to generate a hash table of colors that are most often found on the screen (up to 256 colors) on the server side. The color table is sent to the client side. Subsequently, 1 byte of the color identifier can be written to the place of writing 3 bytes of color. The next step is the lossy compression of the frame based on the allowable difference between the color bytes (the range of the difference can be changed by the user, this affects the packet size and picture quality). Also, in the process of sending the next frames, the program detects unchanged areas and makes an indication that nothing needs to be changed in this place on the screen, if it fails, it tries to refer to a similar color vertically or horizontally. Thus, it is possible to significantly reduce the size of the transmitted packet.

Screen resolution

Controlling screen resolution and picture sizes is entirely dependent on the server-side resolution settings. To change it, use the standard utility xrandr.

Window or Fullscreen mode

Fullscreen mode is enabled when your screen resolution matches the server side screen resolution. Press the F7 key to exit fullscreen mode.

Getting started

  • Build it
# Debian/Ubuntu
sudo apt install libx11-dev libxtst-dev libssl-dev libxext-dev
git clone https://github.com/DeskX11/DeskX/
cd DeskX
make client
make server
# After these steps 2 files will be compiled: `dxc` (the client part, which must be launched on the
# computer from which the control will be carried out) and `dxs` (server part for a managed computer).
  • Build the .deb packages
# Debian/Ubuntu
sudo apt install libx11-dev libxtst-dev libssl-dev libxext-dev
git clone https://github.com/DeskX11/DeskX/
cd DeskX
make deb-client
make deb-server
# After that, you will have the client and server .deb packages in the project's root folder.

Usage

Client

Usage: ./dxс [options]
Options:
	--ip			Ip address of the server
	--port			Port of the server
	--password		Verification secret word without spaces
	--compression		Compression range (0 to 255)
	--events		Protocol for events, TCP or UDP (default: TCP)
	--screen		Protocol for screen, TCP or UDP (default: TCP)
	--disable-vert		Disable vertical compression.
	--cmd			Server side command (default: rat)

Commands:
	exit			Command to shutdown the server side
	rat 			Start remote control

Example:
	./dxс --ip=192.168.0.1 --port=4431 --password=secret --compression=16

Server

Usage: ./dxs [options]
Options:
	--port			Connection port
	--password		Verification secret word without spaces
	--display		Screen number (:0)
	--xauth			Path to .Xauthority file
	--palette		Path to palette file (default: ./palette.deskx)
	--cmd			Command (default: rat)

Commands:
	palette			Palette Generation Mode
	rat 			Start remote control
	all			Launching the two previous modes at once

Example:
	./dxs --cmd=all --port=4431 --password=secret

How to get best performance?

Fast data transfer depends on two factors: the size of the transmitted packet and the transfer rate. To reduce the size of the batch, you can try changing the --compression parameter up. It also helps to reduce the size of the package by creating a color picker that captures the desktop background and interface elements. To create a palette on the server side, you need to run dxs with --cmd=palette. To reduce transmission latency, you can try changing the data transfer protocol for both screen and events (according to my observations, the best option is --screen=TCP and --events=UDP). Also, the speed of the transmission channel plays an important role; it is recommended to use a router with a gigabit LAN. As a last resort, you can also try to disable unnecessary effects such as window shadows.

How to get the best picture quality?

You should take into account that the better the picture quality, the larger the packet size, and this will increase the delay. This moment will always be a compromise between quality and speed. To improve the quality of the picture, you can decrease the value of the parameter --compression. Also, to reduce distortion associated with shadow windows and other visual nuances, run the program with the --disable-vert parameter.

Why is the palette parameter needed?

When you run the program in palette mode, a file is created that stores the 255 most popular colors on your screen so that the compressor can later refer to these colors and not transmit them over the network. Since the process of generating the palette takes some time, it was decided to render it in a separate mode. For comfortable work, first run the program with --cmd=palette and the program will generate a palette file. Then you can run the program with --cmd=rat and remotely access the connection without delay. By running the program with --cmd=all, you will first wait for the palette to be generated and only after that you will be able to connect to the server.

Can't open X-Display.

This error usually occurs when you try to start dxs via ssh. To solve it, you need to specify the --display and --xauth arguments.

  • xauth - path to .Xauthority file.
  • display - display number, default value should be :0 or :0.0.

For more information you can read xauth, Xsecurity and xhost man pages.

Upcoming updates

  • Usage section
  • Sorted links table
  • Server side as a daemon
  • Configuration file
  • GUI part of the program
  • Store meta information for auto-builders in the project's root folder
  • Man-pages (en/ru)

Requirements

  • OS with x11
  • g++ make
  • libx11-dev libxtst-dev libssl-dev libxext-dev
Issues
  • Server closes when trying to connect from client

    Server closes when trying to connect from client

    Hi @mrrva

    Whenever I try to connect to the server on my local network using the command ./dxc --ip=192.168.1.166 --port=4431 --compression=15, I get the following error on the server side:

    zsh: segmentation fault (core dumped) ./dxs --port=4431

    (I'm running zsh shell by the way.)

    When I try to restart the server, I get the following:

    dxs: server/net.cpp:16: netw::netw(int): Assertion `bind(sock1, own.ptr, size) == 0' failed.
    zsh: abort (core dumped)  ./dxs --port=4431
    

    I don't have much else to give you to debug.

    Thanks!

    opened by ejuarezg 6
  •  ./dxs --cmd=all --port=4431 --password=secret >> not work

    ./dxs --cmd=all --port=4431 --password=secret >> not work

    [email protected]:~/DeskX$ ./dxs --cmd=all --port=4431 --password=secret terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid Aborted (core dumped)

    this export and not work

    opened by OmidZamani 3
Owner
DeskX
Remote access software from a remote client to a computer hosting an X Window session. The program is aimed at the maximum speed of transfering.
DeskX
An MQTT-based Virtual Wall for ESP8266 Devices and Gerber files to make the IR hat; this code and board can easily be adapted to be ANY infrared controller/remote!

Roomba-Virtual-Wall-ESP8266-MQTT An MQTT-based Virtual Wall for ESP8266 Devices I made this based off of the IRSend, IRremoteESP8266, and EspMQTTClien

null 8 Sep 20, 2021
A Hidden and Undetectable Remote Access Tool written in C++ and Server in Python3

Spyware-RAT A Hidden and Undetectable Remote Access Tool written in C++ and Server in Python3 This program utilizes the standard winsock library for s

null 25 Jun 17, 2022
🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.

Oat++ News Hey, meet the new oatpp version 1.2.5! See the changelog for details. Check out the new oatpp ORM - read more here. Oat++ is a modern Web F

Oat++ 5.5k Jun 27, 2022
About Add any Program in any language you like or add a hello world Program ❣️ if you like give us ⭐

Hello-World About Add any Program in any language you like or add a hello world Program ❣️ if you like give us ⭐ Give this Project a Star ⭐ If you lik

Lokesh Jangid 16 Jan 22, 2022
High-level networking API for real-time simulations with primitives for remote procedure call and object state replication

tnl2 - Torque Network Library version 2 tnl2 is a high-level networking API for real-time simulations with primitives for remote procedure call and o

Mark Frohnmayer 23 Apr 10, 2022
FreeRDP is a free remote desktop protocol library and clients

FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. Enjoy the freedom of using your software wherever you want, the way you want it, in a world where interoperability can finally liberate your computing experience.

null 7k Jun 27, 2022
Minimalistic server (written in C) and a python3 client to allow calling C function on a remote host

Minimalistic server (written in C) and a python3 client to allow calling C function on a remote host

null 9 Jun 29, 2022
C++ framework for json-rpc (json remote procedure call)

I am currently working on a new C++17 implementation -> json-rpc-cxx. Master Develop | libjson-rpc-cpp This framework provides cross platform JSON-RPC

Peter Spiess-Knafl 795 Jun 27, 2022
Voicemeeter Remote API + Source Code Examples

Voicemeeter-SDK Voicemeeter Remote API + Source Code Examples Voicemeeter Remote API provides a set of functions to control Voicemeeter parameters, to

Vincent Burel 26 May 26, 2022
This is a remote controlled rover which I designed for my minor project.

This is a remote controlled rover which I designed for my minor project. It is controlled remotely, wirelessly, over an internet connection using SSH. For further description, go through the codes :-)

Praneet Kapoor 2 Feb 1, 2022
Light-weight UNIX backdoor

JadedWraith Lightweight UNIX backdoor for ethical hacking. Useful for red team engagements and CTFs. Something I wrote a few years ago as part of a ga

null 124 Jun 10, 2022
ESPHome component for Ikea Idasen desk control

This component creates a bluetooth bridge for an Ikea Idasen desk that uses a Linak controller with ESPHome and an ESP32 device. Cover integration Lin

Julien 104 Jun 17, 2022
Control Hörmann doors drives directly via MQTT from Home Assistant

hoermann_door Control Hörmann doors drives directly via MQTT from Home Assistant

null 54 Jun 20, 2022
Boat Cruise Control

BCC Boat Cruise Control I'm Soaring Skipper and developing a Cruise Control for my RIB boat. After being pulled over by the Water Police twice in one

null 1 Dec 25, 2021
High-performance Fortran program to calculate polarizability and inverse dielectric response function.

DielectricKit First-principles HPC toolkit for simulating dielectric responses Introduction DielectricKit is a high-performance computing toolkit to c

Meng Wu 4 Feb 2, 2022
Ole Christian Eidheim 735 Jun 24, 2022
A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio.

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.

Ole Christian Eidheim 2.3k Jul 2, 2022
LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.

LibVNCServer: A library for easy implementation of a VNC server. Copyright (C) 2001-2003 Johannes E. Schindelin If you already used LibVNCServer, you

null 839 Jun 27, 2022
The implementation of the Domino Network protocol based program.

spacex The implementation of the Domino distributed storage network protocol for the Smart Ecology. With a fully featured and well documented that pro

DominoNetwork 4 Sep 26, 2021