[email protected] wrote: > Am Fri, 23 Oct 2009 11:27:21 -0400 > schrieb Dave Allan <[email protected]>: > >> [email protected] wrote: >>> Am Fri, 23 Oct 2009 08:09:41 -0500 (CDT) >>> schrieb "Gabriel M. Beddingfield" <[email protected]>: >>> >>>> On Fri, 23 Oct 2009, [email protected] wrote: >>>> >>>>> i also write some new lines code for the EVENT_METRONOME and switch the >>>>> printer port pin 1 and 2 just in time with h2 beats. this works simple >>>>> and well. but only as root. i don't get it work as user. i believe this >>>>> is really really complex. some times i hate the linux secure ideas :). >>>> If the user is a member of the 'lp' group... he should be able to do this >>>> without being root. Did you try that? >>>> >>>> $ ls -l /dev/lp0 >>>> crw-rw---- 1 root lp 6, 0 2009-10-12 07:53 /dev/lp0 >>> yes, i try everything in this direction. >>> don't work. >>>> Peace, >>>> Gabriel >> Have you tried, as an experiment, making lp0 world writable? (Is that >> what you mean by "try everything"?) > yep :). > i try this first. > also i do a "setuid root" to the h2 binary. nothing help. > some people have develop a library and some kernel patches to get access as > user. > i have no internet address in moment and also i don't remember the name of > this lib :( hmm, its only three weeks ago if i try to fix this problem and as > i found this lib in internet. > but it looks that this is the only way to get it working on an 2.6 kernel and > udev. > > you have to patch and recompile the kernel. and you have to use commands from > this library in your c code. > i use the <sys/io.h> library to write and read from the lpd port. > i think the problem here is that the kernel don't allow to execute this > commands as user. > independent from the access permission for the /dev/lp0 device. > here is a link to use the sys/io.h library. of course as root :) > http://www.epanorama.net/circuits/parallel_output.html#linuxprogramming
Ugh, patching the kernel seems like an awful lot of effort to maintain. Strange that setuid root H2 doesn't work. Could you use a helper process that has the right perms and then issue the LED on/off operations over a socket or something? > greetings wolke > >> Dave > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Hydrogen-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/hydrogen-devel ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hydrogen-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
