Tiny Core Extensions > TCE Q&A Forum

actkbd and udev

(1/3) > >>

parky_dw:
I've recently used actkbd to set things up so that I can do a screen dump by just hitting the PrintScreen key on my keyboard.  At the moment I have to start actkbd with an explicit path:

actkbd -D -q -d /dev/input/event2

The documentation suggests that way to start the daemon so that it finds the right path for the keyboard is via udev.  It's not working for me.  Syslog shows that the rules file is being processed, but I never end up with a running daemon.  Any ideas?
Working actkdb.conf file is in the default location of /usr/local/etc.
Rules file is in /etc/udev/rules.d
File is:

#udev  for keyboards
ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-9]*", GOTO="_INPUT_"
GOTO "_END_"

LABEL="_INPUT_"
DRIVER=="actkdb", GOTO="_KBD_"
GOTO "_END_"

LABEL="_KBD_"
RUN+="/usr/local/sbin/actkbd -q -D

LABEL="_END_"


I did add a couple of "RUN+=touch" commands to the rules file to see if the branches were being followed and the "touched" files did appear in /tmp.

I'm running Tiny Core 8.2.1 (32-bit).

curaga:
You seem to have a typo in your DRIVER part.

parky_dw:
Typo corrected - made no difference.

I also have another issue - things work fine if I start actkbd manually from a terminal window.  Put the same invocation in bootlocal.sh and it starts up ok but nothing happens when the Print Screen button is pressed.  Ho-Hum!

Maybe time to look at the source and invoke (or add) some debugging messages....

Rich:
Hi parky_dw
You stated:

--- Quote from: parky_dw on December 29, 2017, 01:36:58 PM ---I've recently used actkbd to set things up so that I can do a screen dump by just hitting the PrintScreen key on my keyboard.  At the moment I have to start actkbd with an explicit path:

actkbd -D -q -d /dev/input/event2
--- End quote ---

In your udev rules you have this:

--- Code: ---LABEL="_KBD_"
RUN+="/usr/local/sbin/actkbd -q -D
--- End code ---
What I don't uderstand is how is the  /dev/input/event2  parameter being passed to the  RUN  line?

parky_dw:
Me as well!  I've done nothing involving udev before and am learning as I go along.  What's presented here is a slightly modified version of the sample rule given on the github website: https://github.com/thkala/actkbd/blob/master/samples/udev.rules . The README file implies that if you use udev to launch actkbd then you don't have to to do the detective work to find out which is the correct eventN for it to use.


--- Quote ---Update: On newer kernels several special buttons (like the Power switch) may appear as input devices as well. There is no way for the auto-detection code to tell them apart and it is quite possible that the actual keyboard will not be the one actkbd will select. Using udev to start actkbd is the best way to avoid this problem.
--- End quote ---

BTW: The issue I'm having with bootlocal.sh looks to be an issue with screenshot.sh. This has a quick check at the start that the environment variable DISPLAY is there.  If it isn't, it doesn't run.  My guess (still to be verified) is that it's not there in the environment within which  actkydb is run on boot-up,  as opposed to when actkybd is started from a logged-on user's console.

Navigation

[0] Message Index

[#] Next page

Go to full version