2/12/2026 This is the step-by-step procedure to auto start a program during boot up: This document must be used with the associated video on YouTube: YouTube channel: Making Stuff With Chris DeHut Additional information can be found at: MakingStuffWithChrisDeHut.com This was developed and tested on a Raspberry Pi 3b with a fresh install of the OS around 2/2026 The OS version is TRIXIE which uses wayland and labwc The program I auto started is a python program that would run in python 3. The program also has a graphical user interface and runs on the full desktop install of the OS. YOU WILL NEED TO MODIFY PATHS & FILENAMES TO SUIT YOUR NEEDS! ========================================================================== VERIFY OS NAME >>>cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 13 (trixie)" NAME="Debian GNU/Linux" VERSION_ID="13" VERSION="13 (trixie)" VERSION_CODENAME=trixie DEBIAN_VERSION_FULL=13.3 ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" -------------------------------------------------- DETERMINE IF WAYLAND USES WAYFIRE or X11 >>>echo $XDG_SESSION_TYPE wayland -------------------------------------------------- DETERMIN IF LABWC (window manager) IS RUNNING >>>grep ^user-session /etc/lightdm/lightdm.conf user-session=rpd-labwc -------------------------------------------------- IF RESPONSES ARE CORRECT FOR ALL THREE WE HAVE VERIFIED THE WAY THE OS IS CONFIGURED AND THIS PROCESS SHOULD WORK FOR AUTOSTARTING PROGRAMS!!! -------------------------------------------------- NOW WE CAN MOVE FORWARD WITH THE CONFIGURATION TO AUTOSTART A PROGRAM -------------------------------------------------- RIGHT CLICK on the desktop and select CREATE NEW FILE It will prompt to enter a filename ENTER: launcher.sh It will create the file and place it on the desktop We will open that file and edit it. RIGHT CLICK on the file and select TEXT EDITOR Now enter the following lines of code EXACTLY! #! /bin/bash sleep 8 export WAYLAND_DISPLAY=wayland-0 export XDG_RUNTIME_DIR=/run/user/$(id -u) cd /home/landcam/Desktop/LandCamera/ /usr/bin/python3 LandCam2026.py VERIFY IT IS CORRECT!!!! THEN SAVE THE FILE VERIFY YOU HAVE THE PATHS and FILENAMES CORRECT FOR YOUR PROGRAM!!!! You can close the editor --------------------------------------------- Now we have two more steps to do. 1) We need to set the permissions for EXECUTABLE RIGHT CLICK on the file Select PROPERTIES Select the PERMISSIONS tab Set the EXECUTE value to ANYONE (or other depending on your security) Click OK 2) We need to move that file into the proper directory Open file manager Drag the launcher.sh file into your directory (usually home/pi) ------------------------------------------------------------------ LET'S TEST THIS WHAT WE HAVE DONE SO FAR DOUBLE CLICK on the LAUNCHER.SH file to execute it. If it opens in the editor - you need to set the permisions ! ! ! If you are presented with dialog about EXECUTING the program, select EXECUTE If it runs the program, you are half way there!!!! If not, LOOK FOR MISTAKES IN PATH NAME, FILENAME, SPACES, ETC. ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ NOW WE CAN MOVE ONTO THE FINAL PHASE WHICH IS WHAT ACTUALLY CAUSES THE PROGRAM TO AUTOSTART ON BOOT OR POWER UP. RIGHT CLICK on the desktop and select CREATE NEW FILE It will prompt to enter a filename ENTER: autostart It will create the file and place it on the desktop We will open that file and edit it. RIGHT CLICK on the file and select TEXT EDITOR Now enter the following line of code EXACTLY! /home/landcam/launcher.sh & VERIFY IT IS CORRECT!!!! THEN SAVE THE FILE VERIFY YOU HAVE THE PATHS and FILENAMES CORRECT FOR YOUR PROGRAM!!!! You can close the editor --------------------------------------------- SET THE PERMISSIONS FOR EXECUTION 1) We need to set the permissions for EXECUTABLE RIGHT CLICK on the file Select PROPERTIES Select the PERMISSIONS tab Set the EXECUTE value to ANYONE (or other depending on your security) Click OK --------------------------------------------- THIS NEXT PART IS A LITTLE STRANGE BECAUSE WE HAVE TO WORK AROUND THE PERMISSIONS THAT WILL PREVENT YOU FROM MOVING THAT FILE INTO THE PROPER DIRECTORY. WE WILL START FILE MANAGER USING SUDO RIGHTS. TO DO THAT. . . Open a command prompt Enter the following commnd: sudo pcmanfm File manager will open, but now with SUDO permissions so that we can move the file into a system directory. From the menu item VIEW select SHOW HIDDEN FILES Open the config folder by double clicking on it open the labwc folder by double clicking on it Drag your autostart file into that directory ------------------------------------------------- You are finished with the configuration, reboot your pi and your program should autostart!