makecode-docs

Scripts

This page assumes that you are using a firefox-based browser, or more specifically, mercury. If you are not, you will have to change the arguments in the scripts.

To get the cabinet to work, two scripts have to be written to:

For those who don’t know, .bashrc stores information about the current user’s shell, and is run every time that a terminal instance is created. For example, the $PATH environment variable is stored in this file. You can read more about it here.

mercury_loader.sh is a script that will first check if an instance of mercury is currently running, and if it isn’t, opens a new one. This is the logic that we want to run on startup, so that the cabinet can automatically open the arcade window without input from a mouse or keyboard.

Mercury loader

This script, fully documented, is located in this file.

While it is not strictly necessary that you understand what it does, I know that someone will, so here are a few resources to help parse this file:

The script is designed to work properly, without modification, as long as it is:

once this is done, we can move on to modifying the ./bashrc file.

Using bash for personal gain

All that needs to be done to get this to work is to add the contents of this file to the end of the .bashrc file, located again in ~.

Once that’s done, simply restart the pi or make a new terminal tab, wait ~10 seconds, and bask in unrivaled relief that this thing is finally done after several months of blood, sweat and tears, but mostly tears.

If it doesn’t work, review the steps carefully to ensure that you didn’t miss anything.

With that out of the way, you can move on to making the cabinet.