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

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Mon Feb 27 12:13:43 CET 2012


Sven Barth wrote:
> Am 27.02.2012 11:07, schrieb Mark Morgan Lloyd:

>> 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.

The reason it didn't work as expected might have been because the 
insertion of otherwise-unrecognised devices in /dev/usb is a 
comparatively recent feature. Checking, it's not in 2.6.18 (Debian Etch) 
but is in 2.6.32 (Debian Lenny). Allow for a few kernel steppings for it 
to actually /work/ :-)

But to make those changes (and were they in the host or the guest?) you 
needed root access. So you've moved the problem rather than fixing it 
permanently.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list