Perkify - X11
Written by Rich Morin.
Precis: using Perkify via the X Window System (X11)
This page is an introduction to using Perkify via the X Window System (X11). Let’s start with a bit of terminology:
An X client is an application program that displays on an X server but which is otherwise independent of that server.
So, if Perkify has an X-based application (i.e., client), we should be able to run it from the host OS, using an appropriate server.
The procedure for installing an “appropriate server” varies from OS to OS.
Most Linux distributions include a configured X11 server.
Although macOS no longer supplies an X11 server by default, a
dmgfile for the XQuartz server can easily be downloaded and installed. By default, XQuartz will be stored in the Applications > Utilities folder. After the system has been rebooted, this will be the default X11 server.
Perkify ships with X forwarding enabled and includes a few dozen common X11 clients. So, is your host machine has a working X11 setup, starting up an X11 client should Just Work. However, the command syntax can get a little complicated.
As documented on Vagrant’s
the command to access a virtual machine (VM)
via SSH begins with
vagrant ssh [name|id] [-- extra_ssh_args]
If our current directory is
(or any other directory with a
Vagrantfile and such),
we can leave off the
This leaves us with
which the page explains as follows:
--(two hyphens) are found on the command line, any arguments after this are passed directly into the
sshexecutable. This allows you to pass any arbitrary commands to do things such as reverse tunneling down into the
So now, we’re in the wonderful world of ssh command options.
The ssh man page lists dozens of these,
but fortunately we only need a couple at the moment.
First, we use
-X to tell SSH to enable X11
Then, we use
-p 2222 to tell SSH which port to use.
Following Vagrant’s suggested practice,
Perkify forwards the VM’s SSH port (22) to port 2222 on the host machine.
Finally, we need the name of a command on the VM,
along with any options we want to use with it.
For example, we might want to run an
upating the appearance every two seconds:
$ vagrant ssh -- -X -p 2222 xclock -update 2
As a quick sanity check, let’s try running some example commands (use Control-C to terminate the command):
$ vagrant ssh -- -X -p 2222 xclock -update 2 $ vagrant ssh -- -X -p 2222 xeyes
For a bit more of a stress test, try running a copy of the Firefox web browser on the VM and interacting with it on your host’s window system. Although this actually works, the scrolling won’t be all that fast:
$ vagrant ssh -- -X -p 2222 firefox
Note: The article Run graphical programs within Vagrantboxes gives a nice rundown on X installation and basic usage.
The state of accessibility in the X11 ecosystem seems very fragmented, varying by the particular stack of software that is being used. Apparently, the AT-SPI2 protocol will typically be a major player in any accessible X11 stack. However, this still leaves open the question of what your app is doing, what libraries it is using, what screen reader you are using, etc.
This is all too deep for me, but if you’re interested in digging further, check out Samuel Thibault’s Accessibility page. It provides an overview and lists a lot of useful resources.
To be continued…