WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: actkbd doesn't work under 4.0.1 anymore  (Read 4286 times)

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
actkbd doesn't work under 4.0.1 anymore
« on: October 06, 2011, 11:34:13 AM »
hi friends,

what happened with actkbd?
under microcore 3.8.4 with fluxbox it works fine.

my startup-script:

#!/bin/sh

sleep 1
if [ "`which actkbd`" ]; then
sudo killall actkbd
sudo actkbd -d /dev/input/event1 -D
sudo actkbd -d /dev/input/event3 -D
sudo actkbd -d /dev/input/event5 -D
sudo actkbd -d /dev/input/event7 -D
fi

my actkbd.conf:

113:key::ossmix vol 0
114:key::ossmix vol -- -10
115:key::ossmix vol -- +10
29+56+45:key:exec:su tc -c -l aterm &
29+125+45:key:exec:su tc -c -l lxterminal &
29+125+46:key:exec:su tc -c -l "lxterminal -e mc" &
29+56+46:key:exec:su tc -c -l ~/.wmx/Applications/mc &
29+56+48:key:exec:su tc -c -l browser &
29+56+38:rel:exec:su tc -c -l /usr/bin/exittc &
125+56+25:key:exec:su tc -c -l cpanel &
125+56+50:key:exec:su tc -c -l mnttool &
29+56+1:key:exec:su tc -c -l xkill &
56+60:key:exec:su tc -c -l ~/.wmx/SystemTools/RunProgram &

but in 4.0.1 i see no solution,
do you give me any hints or is it just a bug!?
« Last Edit: October 06, 2011, 11:38:05 AM by netnomad »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #1 on: October 06, 2011, 12:10:03 PM »
Well, what are the logs/errors if any?
The only barriers that can stop you are the ones you create yourself.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #2 on: October 06, 2011, 01:26:37 PM »
when i start actkbd in a terminal i get no errors,
also the script mentioned above causes no errors, too.

bash-4.0$ ps waux | grep act
 5743 root     actkbd -d /dev/input/event1 -D
 5745 root     actkbd -d /dev/input/event3 -D
 5747 root     actkbd -d /dev/input/event5 -D
 6512 tc       grep act

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #3 on: October 06, 2011, 11:27:46 PM »
Working here for me.
My particulars are:
Code: [Select]
~ $ version
microcore_4.0.1
~ $
~ $ cat actkbd.conf
125:key:noexec:
125:rep:noexec:
125:rel:exec:su tc -c aterm &
~ $
~ $ cat /opt/bootlocal.sh
#!/bin/sh
# put other system startup commands here
. /etc/init.d/tc-functions
/usr/local/sbin/actkbd -D -c /home/`cat /etc/sysconfig/tcuser`/actkbd.conf -d `getKeyEventDevice`
~ $

Where getKeyEventDevice is a little function I added to Tiny Core in v3.7
10+ Years Contributing to Linux Open Source Projects.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #4 on: October 07, 2011, 02:22:23 AM »
hi roberts,

yeah, you gave me the right hint.
i put the slightly changed line in my .xsession and it works:

. /etc/init.d/tc-functions
sudo /usr/local/sbin/actkbd -D -c /usr/local/etc/actkbd.conf -d `getKeyEventDevice`

in /opt/bootlocal.sh no success.
in my ~./X.d/.startup i had no success, too!?
on the command line it works, but generates a loud beep.
in the .xsession it works on the first sight smoothly,
but i get in both cases an empty file called "0" in my home-dir...strange.

short question: what's the function of the dot with the space at the beginning of the command?
                         . /etc/init.d/tc-functions

and can i get rid of the "0" in my home-dir?

thank you for your kind help.
« Last Edit: October 07, 2011, 02:49:09 AM by netnomad »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #5 on: October 07, 2011, 03:04:52 AM »
Hi netnomad
It's a synonym for  source  and used to execute the functions in the current shell.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #6 on: October 07, 2011, 03:11:16 AM »
hi rich,

thank you for your reply.

and how can i get rid of the "0" in my home-dir?
is it o.k. to put that function into .xsession?
« Last Edit: October 07, 2011, 03:13:07 AM by netnomad »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #7 on: October 07, 2011, 03:19:50 AM »
It's a synonym for  source  and used to execute the functions in the current shell.
I think the second half of the sentence is a bit irritating (or almost misleading IMHO, and I know it is pretty much a direct quote from a Bash man page).

I think the important part is: When a script is run using source it runs within the existing shell, any variables created or modified by the script will remain available after the script completes

So to add (or change) environment variables (or functions) for the currently running shell one would just have to source a script that contains such export commands (or function definitions).

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #8 on: October 07, 2011, 09:16:53 AM »
and how can i get rid of the "0" in my home-dir?
is it o.k. to put that function into .xsession?
?

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #9 on: October 07, 2011, 02:30:34 PM »
To get rid of 0 in home:
The function had an incorrect test for early exit,

s/b

[ $e -gt 0 ] || exit 1

Re: functions can copied directly into your script.
Your script can run at various places depending on needs and if an X environment is required.
However you may need to adjust for permissions, if run as a regular user.

10+ Years Contributing to Linux Open Source Projects.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #10 on: October 07, 2011, 02:49:35 PM »
hi roberts,

i wasn't able to use your lines in my .xsession,
but now i got it:
probably you mean that i should change the end of your /etc/init.d/tc-functions
...

getKeyEventDevice() {
e=0
for i in /sys/class/input/input*/name; do
  if grep -q "eyboard" $i; then break; fi.
  e=`busybox expr "$e" + 1`
done
#[ $e > 0 ] || exit 1
[ $e -gt 0 ] || exit 1
echo /dev/input/event$e
}


do you want that i modify this line locally and save it over my .filetool.lst
or is it a bug that you will correct in the next release?
« Last Edit: October 07, 2011, 03:08:56 PM by netnomad »

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #11 on: October 07, 2011, 03:16:49 PM »
Sorry, if my prior post confused you. Yes the test line was meant for the function getKeyEventDevice and not .xsession.
I have already corrected the master and will be correct in the next release.
10+ Years Contributing to Linux Open Source Projects.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #12 on: October 07, 2011, 04:07:13 PM »
that's fine, thank you for your reply.

Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: actkbd doesn't work under 4.0.1 anymore
« Reply #13 on: October 08, 2011, 07:04:19 PM »
It may be worth just summarizing that the event devices may have moved. Get showkey and re-test where they're going - I think I changed two in mine, as my extended/hardware keys don't go to the keyboard /dev/eventX entry.

Low stress, though. actkbd works fine.