Giter Site home page Giter Site logo

pi-crust's Introduction

Pi Crust

THIS IS A WORK IN PROGRESS!

Use Raspberry Pi Zero W as hardware barrier client for machines that you can't install the software barrier client on!

The Pi Zero W will connect with your barrier server and sends keyboard and mouse controls to the client machine as if it was a USB keyboard and mouse.

In theory, as long as the machine supports USB HID devices, Pi Crust should be able to control it.

How Does this Work?

It's pretty simple.

The Pi Zero W runs the barrier client and behaves just like another barrier client.

When control changes to the Pi Zero W via barrier, the barrier client will emit X11 mouse and keyboard events. Those events are then captured and forwarded over the USB OTG interface to the end host.

How To Run

Rough instructions at the moment.

  1. Install dependencies on the Pi Zero W on fresh Raspberry Pi OS Lite installation
sudo apt-get install --no-install-recommends xserver-xorg
sudo apt-get install --y barrier xinit x11-xserver-utils xserver-xorg-video-dummy
  1. Configure the Pi Zero W for keyboard emulation https://www.isticktoit.net/?p=1383

  2. Configure the dummy X11 display: https://gist.github.com/divinity76/ce210b5dbcd9ea7d0585ac403caef577

  3. On the machine with the keyboard and mouse, start barriers.

  4. On the Pi Zero W, configure barrierc (some steps in the barrier intsall seem to have been missed)

mkdir -p ~/.local/share/barrier/SSL/Fingerprints
nano ~/.local/share/barrier/SSL/Fingerprints/TrustedServers.txt
# Add Server Fingerprint to TrustedServers.txt
  1. Install dev dependencies on your Pi Zero
sudo apt-get install libx11-dev
  1. Clone the code to your Pi Zero

  2. Using tmux, start X11 and barrierc

  • X11
startx
  • barrierc
barrierc -d DEBUG1 -f --name kvm-01 --enable-crypto --restart 10.160.0.196
  1. Compile the code in this repository and run it to forward X11 keyboard/mouse events over to USB.
make all && ./bin/kvm /dev/hidg0

References/Credits

pi-crust's People

Contributors

frbncis avatar

Stargazers

 avatar Phillip Dykman avatar  avatar Will Brown avatar

Watchers

James Cloos avatar  avatar

Forkers

johnwang16 h3mul

pi-crust's Issues

Wrong usage message

Hi Francis,

I am trying to set up the pi-crust. When I try the last command I get the following error:
Usage: ./bin/kvm <device file> <layout> <unicode>
But looking at the code in src/xreadkeys.cpp I see that the program needs 2 parameter: P_DEV_KEYBOARD and P_DEV_MOUSE. I think that the first parameter should be "/dev/hidg0" which is the keyboard on my pi (it works I think, I could test it) but I am absolutely not sure about P_DEV_MOUSE.
On https://www.isticktoit.net/?p=1383 I could not find a config to set up a mouse driver.

What do I have to pass as a second parameter? Do I have to add a config section in /usr/bin/isticktoit_usb for the mouse device?

Thanks in advance and best regards,
Boris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.