Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wiki:using_acpid_to_control_your_pc_buttons [2011/04/18 07:25] – external edit 127.0.0.1wiki:using_acpid_to_control_your_pc_buttons [2013/03/01 14:01] (current) – Update tinypoodle
Line 1: Line 1:
 +=====Using acpid to control your PC buttons=====
 1. Mount acpid.tcz 1. Mount acpid.tcz
  
-2. Create files /usr/local/etc/acpi/events/all and /home/tc/.acpi/gen.sh along with the containing directories. Change the permission of the gen.sh file to be executable. (I use rox - right-click -> permissions.)+2. Create files ''/usr/local/etc/acpi/events/all'' and ''/opt/.acpi/gen.sh'' along with the containing directories. Change the permission of the ''gen.sh'' file to be executable. (I use rox - right-click -> permissions.)
  
-3. In /usr/local/etc/acpi/events/all, write:+3. In ''/usr/local/etc/acpi/events/all'', write:
 <code>event=.* <code>event=.*
 action=/home/tc/.acpi/gen.sh "%e" action=/home/tc/.acpi/gen.sh "%e"
Line 9: Line 10:
 This code catches all events generated by acpid and passes them to gen.sh. This code catches all events generated by acpid and passes them to gen.sh.
  
-4. In gen.sh, write:+4. In ''gen.sh'', write:
 <code>#!/bin/sh <code>#!/bin/sh
 case $1 in case $1 in
Line 20: Line 21:
     "hotkey ATKD 0000001d"*)     "hotkey ATKD 0000001d"*)
          exitcheck.sh reboot;; # special key #4 reboot with backup          exitcheck.sh reboot;; # special key #4 reboot with backup
-  - *) +    # *) 
-  popup $1;;+    # popup $1;;
 esac</code> esac</code>
 The 4 keys are computer specific and only given as examples. The 4 keys are computer specific and only given as examples.
Line 39: Line 40:
 Once you have everything you want, simply comment out the 2 lines of code before esac again. Once you have everything you want, simply comment out the 2 lines of code before esac again.
  
-For more sleep command options, see the suspend.tcz extension and also the thread about it in tce 2.x news.+For more sleep command options, see the suspend-utils.tcz extension and also the thread about it in tce 2.x news.
  
 The above method is just one way to control buttons with acpid; there are many other ways of doing it; this way is convenient due to the ability to edit the actions file without having to re-initialise acpid each time. The above method is just one way to control buttons with acpid; there are many other ways of doing it; this way is convenient due to the ability to edit the actions file without having to re-initialise acpid each time.
Print/export
QR Code
QR Code wiki:using_acpid_to_control_your_pc_buttons (generated for current page)