Posted on Leave a comment

RaspberryPi – Keyboard and Mouse Sharing 2

How to start the Keyboard and Mouse sharing tool Barrier from a SSH Command line.

Nothing is worse than having your Keyboard and Mouse sharing working but having to USB swap your keyboard when, for some reason or another, your Barrier install disconnects. With a few pieces of knowledge, you can ditch the second Keyboard and never USB swap again.


  • ssh server running on the target RaspberryPi
  • Ability to login as the same user running the desktop on your RasberryPi
  • barrier installed on both machines.

Bare Bones Attempt

If all is well on your systems, this “might” work. Each line is a command. You will have to take the IP address from line 2 and plug it in to line 4 where you see my IP.

hostname -I
ssh pi@raspberrypi
barrierc --name raspberrypi --enable-crypto --display :0

barrier, barrierc, barriers

The barrier tool is in actuality multiple programs.

barrier – A “wrapper” that runs th GUI

barrierc – The Barrier client

barriers – The Barrier server

The barrier command does not have an command line ability and simply launches the GUI which in turn launches the client or server as per chosen options. We will run the barrier client on the raspberry pi

To begin SSH to your RaspberryPi, it should looks something like this:

ssh pi@

Identify the Client “Screen”

RaspberryPi runs a system called X. In order to connect the client to the proper desktop display we need to get something known as the display number. We can use the command w to get this information. Simply type W at the command line

pi@raspberrypi:~ $ w
 11:37:04 up  6:24,  3 users,  load average: 0.04, 0.10, 0.09
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi       tty7     :0               08:19    6:24m 39.88s  1.03s /usr/bin/lxsess
pi       tty1     -                07:04    4:31m  1.38s  0.51s -bash
pi       pts/0    11:35    0.00s  0.58s  0.04s w
pi@raspberrypi:~ $ 

The two most important pieces of information are from the columns USER and FROM

We want the first entry in the list, it is the user on tty7, user pi, you can see it is connected to the display :0 under the FROM column. This is why we used pi from ssh, to guarantee we have the same permission and access to the screen.

Let’s see the command and breakdown each option.

barrierc -f –debug INFO –name raspberrypi –enable-crypto –display :0

barrierc – This is client binary


Runs the command in the foreground, useful for getting things going so we can kill the client easily.

–debug INFO

provides information about what is happening, feedback.

–name raspberrypi

This is the name that you must add on the server config


The transmission of the mouse and keyboard data should be encrypted to avoid interception. The server is enabled by default and you will not be able to connect the client without this turned on.

–display :0

This is the X-Server display number the client is going to control keyboard and mouse for. This is the key difference when executing a graphically element from a desparate console. The barrierc program needs to be told what Desktop it is going to work with.

Normally the barrierc program is executed from within the desktop/windowing system that it is targeting so you don’t need to tell it, but as we are starting it remotely we need indicate the display number.

Barrier Server IP and Port Number

Posted on Leave a comment

If you have not learned systemctl, you need to!

My server for this machine is low memory and the msyql piece craps out all the time. At this point when the site is unresponsive, I don’t even question what the issue will be. One command later and it is running again. After a largely useless legal warning.

Here is the magic command:

systemctl -H restart mysql

The -H is the magic. This new service controller for system has built in ssh-ing abilities. You will need to provide a password if you have not set up your private keys.

And if I need to check up on the service, same command just with status:

systemctl -H status mysql

For reference the old process would have been

service mysql restart

I know it doesn’t seem like a lot but, some of you will understand.

Posted on Leave a comment

Keyboard and Mouse Sharing – Linux + Pi

Bare Bones Install Instructions ( It just worked. ) The bare minimum to get a working installation of the Keyboard+Mouse sharing software Barrier. This can also be used from a Windows machine to a Linux machine or Raspberry Pi.

Barrier – A simple Open Source tool that enables sharing a Keyboard and mouse acrros muliple screens.

Linux Mint 19.x – Install

sudo apt update

sudo apt install snapd

sudo snap install barrier

Raspberry Pi – Install

sudo apt update

sudo apt install barier

Linux Mint 19.x – Run


Raspberry Pi – Run


Configure “Server”

In this installation the Server is the Linux 19.x machine. The machine with the Keyboard physically attached is the server. Place the screen in the correct position ( Each screen represents the whole PC, not the actual screen count .) The name of the machine must match the hostname on the raspberry pi. This will be shown in “Screen name:” of the client”

Once you have finished configuring the server, click the Apply button an then the Start button. The start button will change to a “Stop” button and the screen will show “Barrier is running” in the bottom left corner.

Configure Client

You will need the IP Address of the Server from the Server’s Main Screen. Uncheck “Auto Config” enter the IP address. Re-Check Autoconfig. As before press Apply and Stop. The client will connect and you will be able to move your mouse across both screens. ( Try re-starting server-side if it doesn’t work )


  • Your mouse point must be on the screen to which you are typing.
  • If the client dis-connects first try restarting the server.
Posted on Leave a comment

WordPress Next Stage Social Sharing – Using AddToAny alongside Jetpack.

In my previous post, I walked through a description of the built-in sharing provided by Jetpack. Jetpack adds sharing directly to the publishing workflow. It also adds some helpful preview features. What it lacks is a large selection of social media sites.

To compensate I have added AddToAny as part of my must-have plugins. AddToAny provides easy to use icons for many Social Sharing websites. In particular, I was looking for a plugin that included MeWe, and AddToAny did not disappoint.

Jetpack automates my most prominent social sites, with AddToAny I need to click on the link and manually share, but add2any makes this a seamless process with only a few clicks.

The setup is very straight forward with a large number of services to choose from. You can activate each service with a single click.

I chose a handful of common services

There are a significant number of display options. I have it set only for posts.

If you are looking to get direct follows from your Website Add2Any includes a follow widget for users of your website to click. The widget includes additional services like Instagram, YouTube, and others:

AddToAny is a very popular add on and a great addition to your arsenal of tools.

Posted on Leave a comment

Maximize your WordPress Efforts

Using Jetpack to “echo” your blog post to various platforms like Facebook and Twitter.

As any WordPress user, you have probably been through the routine. Create a post, share to Twitter, share to Facebook, share to a hundred sites to try to improve your traffic. I am here to tell you there is a solution. It is a service offered by WordPress themselves, it is called Jetpack.

You can find the plugin here:

Jetpack is sort of a Backend to WordPress that adds a good number of features and services that make it pretty much indispensable. It has a free tier and a paid tier. For most of my sites, I simply use the free tier and fill in the voids with other plugins.

While Social Sharing can be handled by many other plugins I have found the dead-simple integration by Jetpack to hit the mark. I have tested out other plugins only to be frustrated by a cumbersome interface or process or even outcome.

When you connect to Jetpack you will get a new icon in your post properties, it is a little green circle with two triangles:

Selecting the Jetpack icon swaps out the panel and shows the Jetpack panel. The first detail on the panel is the “Share this post.” Section. As you can see this site automatically shares four social sites that are included in the free version of Jetpack.

Once these are set, nothing else needs to be done. All your posts will be automatically shared on all these social sites. There are more available in the paid version.

The next item available is Social Previews. In the past, I played the post/delete/post again game when my post did not appear correctly on the social site. Now I have the habit of checking the preview before I post.

The preview for this post looks like this:

If you have added a post that is more narrowly targeted, you can disable sharing and only include the social sites that are appropriate for that post.

It seems that Jetpack only supports these four platforms, I had hoped for more but I’ll take what I can get.