Introduction: Controlling Your Raspberry Pi Mouse and Keyboard Remotely Without Connecting Physical Mouse and Keyboard (not Vnc)

In one of my projects i needed to access multiple raspberry pies to control the mouse and keyboard on screen without hooking a physical mouse and keyboard to each one of them.

To do that i have written a small dashboard which allow you to simulate mouse and keyboard from your remote laptop directly to raspberry pi connected to a display, not through VNC.

This dashboard is also written with plugins support in mind so anyone that needs a new feature can implement it as a plugin and use it directly from the dashboard.

what you will need to implement this guide.

  1. raspberry pi (with os installed)
  2. Nodejs to be installed on the reaspberry pi
  3. piBoard to be installed on the reaspberry pi
  4. piBoard client to be running on your laptop

I will go through steps from 2 - 4, as the first step should be the first things that you have done when you got your raspberry pi.

Step 1: Installing Nodejs on Raspberry Pi

SSH to your raspberry pi and use the following command to install nodejs:

wget http://node-arm.herokuapp.com/node_latest_armhf.deb

Then run

sudo dpkg -i node_latest_armhf.deb

Step 2: Installing and Configuring PiBoard on Raspberry Pi

SSH to your raspberry pi and follow these steps to install and run the piBoard on your raspberry pi.

wget https://github.com/piBoard/piBoard/archive/master.zip

Now you will have a new folder called piBoard-master, cd to this folder:

cd piBoard-master

Now run the install script which will take care for installing all the dependencies and setting up the piBoard-server to run on startup, also it will setup the core plugins

to do that run this command

chmod 755 ./install.sh && ./install.sh

Installation my take couple of minutes so be patient please, also the command might ask you for your sudo password, this is because it will try to apt-get install some applications that are needed by the plugins to run.

Configuration
After finishing the installation you can edit the package.json file to edit your piBoard name and password.

vim package.json

and change the password and name fields, leaving the password field blank will allow piBoard-client to access your board without authentication

Code:

{
  "piBoard": {
    "name": "piBoard",
    "password": "1234567" 
  }
}

Step 3: Download and Install PiBoard Client on Your Laptop

Get the latest release from piBoard Client form the Client repo, under releases.

https://github.com/piBoard/piBoard-client/releases

Run the client by double clicking on the piBoard binary file, this will open the client and run auto scan to detect all the connected raspberry pi devices on the same network you are connected to.

Select the raspberry pi you want to connect to and enter the password if asked, then you can see the Mouse and keyboard panel where you can control the raspberry pi you are connected with.

Microcontroller Contest

Participated in the
Microcontroller Contest