FolkComputer / folk

🎁 Physical computing system.
https://folk.computer
Apache License 2.0
75 stars 4 forks source link

Remove sudo from keyboard commands #159

Closed cwervo closed 2 months ago

cwervo commented 2 months ago

This PR is meant to address #157.

cwervo commented 2 months ago

@s-ol I tried your suggestion in this branch, unfortunately I'm getting an obscure error I can't find answers for right now (will try researching more tomorrow). Whenever you get a chance could you try running this on your system and see if you get the same error?

```bash in match m1:0: KDSKBMODE: Operation not permitted: could not switch to Unicode mode Jul 08 22:17:35 folk0 make[65320]: KDSKBMODE: Operation not permitted: could not switch to Unicode mode Jul 08 22:17:35 folk0 make[65320]: while executing Jul 08 22:17:35 folk0 make[65320]: "exec loadkeys $name" Jul 08 22:17:35 folk0 make[65320]: (procedure "::keymap::load" line 2) Jul 08 22:17:35 folk0 make[65320]: invoked from within Jul 08 22:17:35 folk0 make[65320]: "keymap load us" Jul 08 22:17:35 folk0 make[65320]: (lambda term "{this keyboardDevices keyboard} { Jul 08 22:17:35 folk0 make[65320]: source "lib/keymap..." line 29) Jul 08 22:17:35 folk0 make[65320]: invoked from within Jul 08 22:17:35 folk0 make[65320]: "apply {{this keyboardDevices keyboard} { Jul 08 22:17:35 folk0 make[65320]: source "lib/keymap.tcl" Jul 08 22:17:35 folk0 make[65320]: set cc [c create] Jul 08 22:17:35 folk0 make[65320]: $cc include Jul 08 22:17:35 folk0 make[65320]: $cc in..." Jul 08 22:17:35 folk0 make[65320]: ("eval" body line 1) Jul 08 22:17:35 folk0 make[65320]: invoked from within Jul 08 22:17:35 folk0 make[65320]: "eval $__body" Jul 08 22:17:35 folk0 make[65320]: (lambda term "__body { Jul 08 22:17:35 folk0 make[65320]: When /someone/ wishes program code /__c..." line 5) Jul 08 22:17:35 folk0 make[65320]: invoked from within Jul 08 22:17:35 folk0 make[65320]: "apply $lambda {*}$env" Jul 08 22:17:35 folk0 make[65320]: invoked from within Jul 08 22:17:35 folk0 make[65320]: "time {set ret [apply $lambda {*}$env]}" Jul 08 22:17:35 folk0 make[65320]: ("uplevel" body line 1) Jul 08 22:17:35 folk0 make[65320]: invoked from within Jul 08 22:17:35 folk0 make[65320]: "uplevel [list time $body]" Jul 08 22:17:35 folk0 make[65320]: (procedure "baretime" line 1) Jul 08 22:17:35 folk0 make[65320]: invoked from within Jul 08 22:17:35 folk0 make[65320]: "baretime {set ret [apply $lambda {*}$env]}" Jul 08 22:17:35 folk0 make[65320]: (procedure "runInSerializedEnvironment" line 9) Jul 08 22:17:35 folk0 make[65320]: invoked from within Jul 08 22:17:35 folk0 make[65320]: "runInSerializedEnvironment $lambda $env" ``` Error log
s-ol commented 2 months ago

Hm, unfortunately seeing the same problem on Ubuntu (that I'm not seeing on Arch), I have no idea what the error message is supposed to mean either :/

cwervo commented 2 months ago

@s-ol I think I found a workaround, using kbd, which comes along with console-data anyway. Give that a try if you have a sec, it's working on folk-cwe (my home system).

cwervo commented 2 months ago

Tested on folk0 today, works without issue :)