When I press power button in usb keyboard/ir the program offer me a menu "shudown reboot exit.." I want to shutdown it immediately when i press button, how to do?
- 1AFAIK there's no setting to change the exit behavior.ChanganAuto– ChanganAuto2025-11-08 10:28:31 +00:00Commented Nov 8 at 10:28
- 1On standard kodi using X11 I have obtain what I want. Only one problem: it use X11, so I use xfce, so is probably a behavior of Xfce power manager instead of kodi.elbarna– elbarna2025-11-08 17:31:35 +00:00Commented Nov 8 at 17:31
- I wonder if this would help you askubuntu.com/questions/460/…? I realise it's pretty old so I don't know if it's still valid.Philip Couling– Philip Couling2025-11-09 16:38:34 +00:00Commented Nov 9 at 16:38
Add a comment |
1 Answer
Create a shortcut on the screen:
- For sufficiently fresh systemd:
sudo poweroff --force --no-wtmp --no-sync --no-wall - This will work for any Linux distro but it's a reboot command:
echo r | sudo tee /proc/sysrq-trigger Both these commands will shutdown/reboot your system without closing any apps or writing any data to the disk. In short data will be lost.
- Why add the
--no-sync, why risk the data loss that may come with? AFAIK cache will not prevent the shutdown, just add a few ms to the shutdown sequence.Philip Couling– Philip Couling2025-11-09 16:29:30 +00:00Commented Nov 9 at 16:29 - There is no screen, is kodi only on omsc.elbarna– elbarna2025-11-09 19:20:26 +00:00Commented Nov 9 at 19:20
- @PhilipCouling They said "I want to shutdown it immediately when i press button, how to do?" Syncing caches can take quite some time.Artem S. Tashkinov– Artem S. Tashkinov2025-11-22 10:38:16 +00:00Commented Nov 22 at 10:38
- @ArtemS.Tashkinov okay this answer should pobobably contain a caveat to explain that since it's a very specific interpretation of the word "immediately". In context of the question I think many would read that word as meaning only "don't wait for user confirmation" and not expect skipping other important shutdown steps.Philip Couling– Philip Couling2025-11-22 10:56:03 +00:00Commented Nov 22 at 10:56