On Mon, 7 Jul 2014, Flávio Schiavoni wrote:
You said you already know how to capture kb events
without a kernel
module.
Do you need to run it with sudo?
I'm asking it to try to help with your other doubt involving Jack MIDI
or ALSA MIDI.
Here goes my 3 cents.
If you need to run it with sudo, maybe the best approach is to divide
the system in a client / server paradigm.
One part is the kb event capture, running with sudo, and the other one
to generate MIDI events, in user space, no matter which API is used.
You can use RPC, DBUS or a UDP socket in localhost to exchange data
between both parts.
Right now, I have to sudo to run it. The author of
http://lsmi-all.sourceforge.net/ suggests:
"In order to be run by a non-root user the drivers must have access to
the device files in /dev/input. This may be accomplished by adding a group
'input', adding desired users to this group, and configuring udev to
assign the appropriate ownership to files in /dev/input. It should be
resonably safe to run the drivers as root, however."
lsmi uses alsa midi and so can be run as root from the startup scripts.
Adding an input group would allow running as user. Runnning as the user:
- allows using jack ports directly. Saves using through lines or a2j as
most DAW projects work with jack ports.
- allows the user to start/stop the application.
- allows the user to configure the keys.
- allows the application to use the screen for feed back.
I have used sockets for this stuff before, but would prefer not to. I am
going to figure out udev.
--
Len Ovens
www.ovenwerks.net