[Lazarus] run program in ide with sudo for debug purpose

Sven Barth pascaldragon at googlemail.com
Mon Feb 27 16:09:15 CET 2012


Am 27.02.2012 16:06, schrieb waldo kitty:
> On 2/27/2012 05:11, Sven Barth wrote:
>>> I'd be happy to be proven wrong, but my understanding is that you do
>>> since there is one specific kernel call (in effect, telling the kernel
>>> to release an unrecognised device to an unprivileged program) that won't
>>> work otherwise.
>>
>> I already managed the following some time ago for a scanner that was not
>> supported by SANE:
>> * setup a Windows VM in QEMU
>> * tell QEMU to pass the scanner to the VM
>>
>> If I now started the VM I became a "permission denied" error when it
>> tried to
>> open the corresponding dev node. Now I simply changed (at that time
>> without udev
>> rules, because they somehow didn't work as I wanted them to) the group
>> of the
>> corresponding device file (/dev/usb/{bus}/{device}) to a group my user
>> is part
>> of and Tada! it worked. So no, you don't need Root access for an
>> unrecognized
>> device.
>
> why not just add your user(s) to that group the device was in? this
> would/should give the same access capabilities... or am i missing
> something else?

The USB device files are by default created with root:root. I changed 
the one of my scanner to root:plugdev by hand (and yes, my user belongs 
to plugdev ;) )

Regards,
Sven





More information about the Lazarus mailing list