Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: mb on December 18, 2011, 07:06:49 PM
-
When i went to install the bind command i noticed it was 9MB even without any of the dependencies... almost the same as the whole microcore base. All i want from bind is to be able to run a command when i press one of the F-keys. Is there any less bloated alternative?
-
Bind.tcz is the Berkley Internet Name Domain.
This has nothing to do with key binding.
Perhaps you want keyutils.
-
Keyutils appears to be about encryption? actkbd should still listen to keys ;)
-
actkbd requires module 'evdev' which is not included.
[also it refers to 'actkbd.sample' in the info, which should be 'actkbd.conf.sample']
-
Just tested, actkbd works fine on 4.1. We even have a function to give you the keyboard device, ie
. /etc/init.d/tc-functions
sudo actkbd -D -d `getKeyEventDevice`
-
OK.. (actkbd readme (http://users.softlab.ntua.gr/~thkala/projects/actkbd/latest/README)said it required evdev)
Would you mind helping me figure it out..
how would i get to the point where, for example, pressing 'F1' would run 'mpc toggle'??
I created /usr/local/etc/actkbd.conf and tried various mutations of '59:::echo mpc toggle &' and ran 'sudo actkbd -D -d `getKeyEventDevice`' but with no luck. (note: 'getKeyEventDevice' doesn't work as a command for me?)
(scan codes (http://www.fastgraph.com/help/low_level_keyboard_handler.html))
-
We have the evdev module built in.
- did you source the functions file first?
- are you sure it's 59? actkbd has an option to show the key codes.
- when run as a daemon, you won't see the echo. Run without -D when testing.
-
sorry for my noobness.. what do you mean did i source the functions file??.. /etc/init.d/tc-functions was present and i ran '/etc/init.d/tc-functions'.
I'm not certain its 59 (although the link agrees with all those mentioned in conf.sample); but i tried it with '42' (L Shift, listed in the sample) also in case of this and no change.
e: without '-D' i am returned 'failed to read event from getKeyEventDevice: Sucesss'
(evdev wasn't mentioned with an lsmod, which is why i thought it wasn't present.)
-
There's a dot and a space before /etc/... - this is shorthand for "source /etc/...." which makes those functions available.
To check the keycodes on your keyboard, run "sudo actkbd -s -d $(getKeyEventDevice)" and then press those keys. Control-C quits. The backticks have the same meaning as the $() syntax.
-
Thanks! ..works much better than bind did before. 8)
-
When running with '-D' is there any way out output text at all?
e: also how can i use hardware buttons, like the power button (and others) ??
-
Please spend some time reading the wiki.
-
I have read a fair bit of the wiki. I guess you were refering to this (http://wiki.tinycorelinux.net/wiki:using_acpid_to_control_your_pc_buttons), which i can't say i expected to be in the wiki.
what about the first part of my post? can you force text output when in daemon mode?
-
Daemons have no tty, so they cannot do output.
Many daemons can be configured to log to files.
You need to read the documentation for each specific program.