Hi
I wrote a guide explaining how to soft implement an equivalent to BusKill using a power supply event to trigger a command in dom0.
Feel free to ask if you have questions or Qubes OS specific implementation questions
Hi
I wrote a guide explaining how to soft implement an equivalent to BusKill using a power supply event to trigger a command in dom0.
Feel free to ask if you have questions or Qubes OS specific implementation questions
For udev
rules you should add
ENV{POWER_SUPPLY_TYPE}=="Mains"
because there is alot of devices in SUBSYTEM=="power_supply"
with envinriment POWER_SUPPLY_ONLINE
, including usb
Thank you very much for bringing this, I fixed my guide
I tested it on my laptop too, works fine with this extra bit added.
On Qubes OS, this could easily be extended if you want to run a command only if a given wifi SSID is not found around (like, you disconnect the computer and you are not at home / office).
#!/bin/sh
if ! qvm-run -u user sys-net "nmcli device wifi list | grep MY-WIFI-SSID"
then
systemctl poweroff
fi