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.
Video example of how the program works (compression parameter is 16, protocol for events and screen is TCP, gigabit LAN is used)
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.
Controlling screen resolution and picture sizes is entirely dependent on the server-side resolution settings. To change it, use the standard utility xrandr.
Fullscreen mode is enabled when your screen resolution matches the server side screen resolution. Press the
F7 key to exit fullscreen mode.
# Debian/Ubuntu sudo apt install libx11-dev libxtst-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). # MacOS brew install sdl2 git clone https://github.com/DeskX11/DeskX/ cd DeskX make client
# Debian/Ubuntu sudo apt install libx11-dev libxtst-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.
Or you can download packages from the Release section
Also, there is an AUR repository for Arch Linux users (Thanks to joserebelo!)
Usage: ./dx [options] Options: --ip Ip address of the server --port Port of the server --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 --compression=16
Usage: ./dxs [options] Options: --port Connection port --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
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
--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.
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
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.
This error usually occurs when you try to start
dxs via ssh. To solve it, you need to specify the
For more information you can read xauth, Xsecurity and xhost man pages.
On macOS, you can use the client side of the program to connect to your linux server. To do this, you must have the
SDL2 library installed. It can be supplied for example via the
brew package manager. After that, compile through the
make client or download the already compiled version here.
libx11-dev libxtst-dev libxext-devor