Hi,
How can I activate the "magic keys" (Alt+SysRq+letter)? They don't work, so I guess they're not active by default.
Also, I would like the power button to do a shutdown, as it does in some other distributions. Is it possible?
Thanks a lot.
Hi,
How can I activate the "magic keys" (Alt+SysRq+letter)? They don't work, so I guess they're not active by default.
Also, I would like the power button to do a shutdown, as it does in some other distributions. Is it possible?
Thanks a lot.
Hi there!
Magic SysRq key
The feature is controlled both by a compile-time option in the kernel configuration, CONFIG_MAGIC_SYSRQ
…
tux@slitaz:~$ zcat /proc/config.gz | grep 'SYSRQ'
# CONFIG_MAGIC_SYSRQ is not set
tux@slitaz:~$
Power button
# Fn Keys
xbindkeys &
xbindkeys -k
tux@slitaz:~$ xbindkeys -k
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
m:0x0 + c:124
XF86PowerOff
nano ~/.xbindkeysrc
or
leafpad ~/.xbindkeysrc
Exec=tazbox logout
tazbox logout
in terminal. Yes, it works! But if I want only shutdown? logout)
# Logout window with actions
main=
logout_main
So, to halt the your computer, you must command poweroff! Ok, ok… Now back to our text editor with .xbindkeysrc (now we know the command)
#power off button
"poweroff"
m:0x0 + c:124
XF86PowerOff
Hi Aleksej,
Thanks a lot for your detailed explanation! Alas the power button isn't detected (neither by xev), so I bound poweroff to Ctrl-Alt-Del instead.
Maybe I'll consider recompiling the kernel. The Sysrq keys are useful to avoid a mere unplugging when the computer is frozen.
Thanks again.
Any response from Power key? No key code & no key name?
Wikipedia says about SysRq key:
Some people view this key as giving access to dangerous system-level commands to anyone who has physical access to the keyboard or serial console.
;)
Absolutely nothing. I just noticed that "Power button" is reported in Xorg's log (and it's supposed to be configured!). But I have no idea if something can be put in xorg.conf for it to work.
It is good that you can configure your keys using xbindkeys, but it is not right way while we using power/suspend/hibernate keys!
I want to find right way, and I started here: Shutdown Pressing Power Button - ArchWiki.
Here is acpi package file list in the SliTaz stable. I have installed acpid package. And opened their files in text editor.
For example, /etc/acpi/events/buttons:
# /etc/acpi/event/button
# lid, sleep or power button events
event=button.*
action=/etc/acpi/acpi_handler.sh "%e"
Start of file /etc/acpi/button.sh:
#!/bin/sh
# button.sh - Managing button events for SliTaz
#
source /etc/acpi/key-constants
...
But we have not file key-constants in any SliTaz package! But button.sh is designed exclusively for SliTaz! Hmm...
Here is acpid branch in the wok-stable (with receipt and other stuff).
I found key-constants here. Now my experiments suspended (I close my lid ;) )
Seems like acpid is broken and have not all parts of its body to work properly...
You must log in to post.