[Lazarus] run program in ide with sudo for debug purpose
Sven Barth
pascaldragon at googlemail.com
Mon Feb 27 11:11:31 CET 2012
Am 27.02.2012 11:07, schrieb Mark Morgan Lloyd:
> Henry Vermaak wrote:
>> On 26/02/12 13:29, Mark Morgan Lloyd wrote:
>
>>> I've had this sort of requirement in the past, specifically when using
>>> libusb (i.e. the program needed sufficient privilege to grab the
>>> device).
>>
>> You need udev rules that set the user/group permissions for the
>> devices that you use. You don't need to run as root.
>
> 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.
Regards,
Sven
More information about the Lazarus
mailing list