Controlling DietPi with SSH Shortcut

Although DietPi works great as an audiophile OS, unlike other headless OS, it does not know when to turn off the screen when audio playback is stopped. In this sens you will need to turn ON/OFF the screen manually with SSH shortcuts. Having tested several SSH shortcuts apps in Android, this one works like a charm.

Firstly, add a new SSH server with a label (e.g. STEALTH), login and password. Leave the port unchanged.
Add the following commands if needed:

SCREEN OFF
export DISPLAY=:0 && xset s 5
TIP: You can replace "5" in the above script with whatever timeout you want.

SCREEN ON
export DISPLAY=:0 && xset s default && xset s reset

SHUTDOWN
sudo shutdown
NOTE: Shutdown occurs after 1 min.

REBOOT
sudo reboot

Comments

Popular posts from this blog

Installing LMS and Squeezelite on DietPi (Raspberry Pi Streamer / Player Tutorial)

Installing Roon extension on DietPi

DIY Raspberry Pi 4 piCorePlayer Part I - Mechanical Design & Assembly