I was sitting there wondering how this could be done and just went to ChatGPT for guidance.
Maybe this will help:
Steps to Fix:
Switch to a Virtual Console (TTY):
-Press Ctrl + Alt + F2 (or F3, etc., depending on availability) to switch to a virtual console.
-Log in using their username and password.
-Run the script from the virtual console.
If they need to return to the graphical desktop, they can press Ctrl + Alt + F1 or F7.
Run the Script without X Server:
-If they want to boot into a non-graphical environment directly:
-Edit the default boot target:-Reboot the system. It will boot into a terminal (non-graphical mode).
-To return to the graphical desktop later, they can run:Update Directories in the Script:
Since they mentioned that the directories have changed (from /home/pi to /home/desktop), they need to update the script:
Alternative to fbi for Graphical Environments:
If they want to use a solution that works within the graphical desktop environment:
Install a viewer like feh (lightweight image viewer):Update the script to use feh instead of fbi:Debugging and Further Assistance: If the issue persists, make sure:
The fbi package is installed:
The PosterPi.txt file is being generated correctly with find and shuf.
The framebuffer is accessible:
If /dev/fb0 does not exist, ensure that framebuffer support is enabled in the kernel and no conflicting graphical services are running.
Maybe this will help:
Steps to Fix:
Switch to a Virtual Console (TTY):
-Press Ctrl + Alt + F2 (or F3, etc., depending on availability) to switch to a virtual console.
-Log in using their username and password.
-Run the script from the virtual console.
If they need to return to the graphical desktop, they can press Ctrl + Alt + F1 or F7.
Run the Script without X Server:
-If they want to boot into a non-graphical environment directly:
-Edit the default boot target:
Code:
sudo systemctl set-default multi-user.target
-To return to the graphical desktop later, they can run:
Code:
sudo systemctl set-default graphical.targetsudo reboot
Since they mentioned that the directories have changed (from /home/pi to /home/desktop), they need to update the script:
Code:
rm /home/desktop/PosterPi.txtrm /home/desktop/PosterPi.tmpfind /home/desktop/Posters -name "*.*" > /home/desktop/PosterPi.txtshuf -n 50000 /home/desktop/PosterPi.txt > /home/desktop/PosterPi.tmpfbi -a -1 -t 5 --noverbose -l /home/desktop/PosterPi.tmp
If they want to use a solution that works within the graphical desktop environment:
Install a viewer like feh (lightweight image viewer):
Code:
sudo apt install feh
Code:
feh --fullscreen --slideshow-delay 5 /home/desktop/Posters
The fbi package is installed:
Code:
sudo apt install fbi
The framebuffer is accessible:
Code:
ls /dev/fb0
Statistics: Posted by retnuhflim — Sun Nov 17, 2024 7:23 pm