Autostart H2R Graphic

Automate H2R Graphics on Raspberry Pi

You can start H2R Graphics as well as opening browser windows automatically each time the Raspberry Pi is booted but is dependant on which windows manager you are using. If not sure read this

If you are running Wayland

If you installed the default OS on your Pi 4 and Pi 5 and not enabled X11, then you are running on Wayland.

Autostart H2R Graphics Server

We need to edit the wayfire.ini file and add a section

nano ~/.config/wayfire.ini

Now scroll all the way to the last line and add the following:

[autostart]
1 = $HOME/H2R/root/./AppRun

Once again exit the editor and save by pressing, Crtl + X, then Y, then Enter.

Autostart Chromium-browser window

H2R will atttempt to re-open the browser window on start. This might work for you but if you need more control then it is better to launch the chromium-browser as part of the auto-start process.

In this case the wayfire.ini file should look like this:

[autostart]
1 = $HOME/H2R/root/./AppRun
2 = sleep 10; chromium-browser "http://127.0.0.1:4001/output/ABCD/?bg=black" --start-maximized --start-fullscreen --incognito

the portion of code between "" need to match your application. This example open the output 1 on project ABCD with black background. (The sleep 10 is necessary to ensure H2R start before the browser and is not in the foreground)

If you are running X11

If you are running a legacy OS (Bullseye) or have changed the default window manager via the raspi-config tool from Wayland to X11, then you are at the right place.

Instructions are on the way..

Last updated