[Solved] VC button to shutdown the RPi
-
- Posts: 139
- Joined: Sun Nov 25, 2018 7:55 pm
- Real Name: Gerard van Hamburg
Sorry to ask but even after reading the documentation I still have no idea how to add a script containing a system command to shutdown the RPi. I would like to have a button on the VC to gracefully shut the RPi when I am done. Who can help me out?
Last edited by Mibmusic on Wed Dec 12, 2018 7:14 pm, edited 1 time in total.
- edogawa
- Posts: 636
- Joined: Thu May 07, 2015 10:34 am
- Real Name: Edgar Aichinger
Isn't that a contradiction in itself? You cannot quit QLC without leaving run mode,which makes your VC widget inactive...
But if you're running Massimo's QLC+ image, that version of QLC has a configuration screen with buttons for reboot and shutdown.
But if you're running Massimo's QLC+ image, that version of QLC has a configuration screen with buttons for reboot and shutdown.
-
- Posts: 139
- Joined: Sun Nov 25, 2018 7:55 pm
- Real Name: Gerard van Hamburg
I just thought that if you can run a script from within QLC+ that can start programs, it might be possible to run a script that shuts the RPI. We don’t use a monitor and we prefer to not use wifi either. If not, we will use wifi, or buy a shutdown button. I read some guy designed them.
- edogawa
- Posts: 636
- Joined: Thu May 07, 2015 10:34 am
- Real Name: Edgar Aichinger
Yes, that may well be possible, I don't have experience in QLC scripting so you'll have to experiment yourself.
From the docs I see that there's a systemcommand keyword that you'll need. But it's not a trivial task, as shutdown is a superuser command, so you'll need to call it via sudo, and I don't see a way with scripting to enter your password...
From the docs I see that there's a systemcommand keyword that you'll need. But it's not a trivial task, as shutdown is a superuser command, so you'll need to call it via sudo, and I don't see a way with scripting to enter your password...
- mcallegari
- Posts: 4807
- Joined: Sun Apr 12, 2015 9:09 am
- Location: Italy
- Real Name: Massimo Callegari
- Contact:
QLC+ is ran at startup, so no sudo is needed.
That's it
Code: Select all
systemcommand:/sbin/halt