Maintenance made-with-Go

The aim of this project is develop a WebRTC screenshare designed for streaming video games and accepting remote inputs. There will be ansible instructions which can be executed inside into any virtual environment. This will be a plugin which complements the project P2PRC

Testing with Xplane 11



Based on the fork: https://github.com/Akilan1999/laplace/tree/keyboard_mouse


Installation required to share keyboard and mouse

To do this we ensure that the client either has an IPV6 address or a public IPV4 address. We use the popular open repository known as Barrier KVM.

What is Barrier kvm?

Barrier is software that mimics the functionality of a KVM switch, which historically would allow you to use a single keyboard and mouse to control multiple computers by physically turning a dial on the box to switch the machine you’re controlling at any given moment. Barrier does this in software, allowing you to tell it which machine to control by moving your mouse to the edge of the screen, or by using a keypress to switch focus to a different system.

Barrier KVM build status and links to install

Platform Build Status
Linux Build Status
Mac Build Status
Windows Debug Build Status
Windows Release Build Status
Snap Snap Status

Build from source

# Assumes to be running on ubuntu 20.04
# Ports required to be allocated internally:
# - 8888 (laplace server)
# - 24800 (barrier server)

# Updating and installing go compiler
apt update
apt install -y golang
apt install -y jq
## Installing git
apt install -y git
## Installing barrier
apt install -y barrier
## Installing chromium
wget https://github.com/RobRich999/Chromium_Clang/releases/download/v94.0.4585.0-r904940-linux64-deb-avx/chromium-browser-unstable_94.0.4585.0-1_amd64.deb
apt install -y ./chromium-browser-unstable_94.0.4585.0-1_amd64.deb
## clone remotegameplay distribution
git clone https://github.com/Akilan1999/remotegameplay
## enter cloned directory
cd remotegameplay

# Build laplace binary file
go build .

# Set configuration laplace file
./laplace -setconfig

Program Execution

Executing this project basically serves an HTTP server that will host the frontend and the WebSocket implementation. Note that you sometimes need to run HTTPs in order for browser to connect to websocket.

$ ./laplace --help
  -BinaryToExecute string
    	Providing path (i.e Absolute path) of binary to execute
  -addr string
    	Listen address (default "")
  -certFile string
    	TLS cert file (default "files/server.crt")
    	Creating screenshare using headless mode
  -keyFile string
    	TLS key file (default "files/server.key")
    	Kills all chromuim
    	Kills the laplace
    	Getting room id of headless server
    	Generates a config file
    	Use TLS

By default, you can run the executable without any argument to listen to TLS port 443. A self-signed certificate files are provided to ease up development. If you want to run with barrier KVM. Run as non-root.

Starting game when screen-share is triggered

This requires creating a bash script to trigger when the screenshare begins.

Ex: Start Xplane 11

Let’s call this script xplane11.sh

# Navigating to the directory where XPlane11 is present 
cd /path/.local/share/Steam/steamapps/common/X-Plane\ 11/

# Execute Xplane 11 binary 

Open config file

<div class="highlight highlight-source-shell position-relative" data-snippet-clipboard-copy-content="{
" barrierhostname": "”,
“ipaddress”: “”,
“rooms”: “”,
“scripttoexecute”: “”,
“systemusername”: “”

  "barrierhostname": "",
  "ipaddress": "",
  "rooms": "",
  "scripttoexecute": "",
  "systemusername": ""