I'm running into an error when trying to auto start a python script. I'm working with a Pi5 on wayland. Script works no problem in an IDE. The issue is when I try to run on start I get the error:
error:XDG_RUNTIME_DIR is invalid or not set in the environment.
I am trying to run the script from the bashrc file with:If I run $printenv I see the variable in the environment XDG_RUNTIME_DIR=/run/user/1000, echo $XDG_RUNTIME_DIR reveals the same.
I have tried to put "export XDG_RUNTIME_DIR=/run/user/$(id -u)" in the bashrc file to no avail.
I've tried this fix https://utdream.org/xdg_runtime_dir-is- ... erry-pi-5/, but it errors out when I try the start command.
error:XDG_RUNTIME_DIR is invalid or not set in the environment.
I am trying to run the script from the bashrc file with:
Code:
sudo python3 /home/pi/DeesQualityNuts.py &
I have tried to put "export XDG_RUNTIME_DIR=/run/user/$(id -u)" in the bashrc file to no avail.
I've tried this fix https://utdream.org/xdg_runtime_dir-is- ... erry-pi-5/, but it errors out when I try the start command.
Statistics: Posted by Vanlon — Sat Oct 12, 2024 10:46 pm — Replies 1 — Views 38