Re: Help using scripts when USB devices plug-in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case of /dev/video0, the user logged via gdm is the user must have the permissions.

In case of /dev/ttyACM0, all users logged in the machine (locally, remote ssh, remote x, local x, etc).

As you explained, perhaps for /dev/video0, the method will be console.perms (I don't know how to do it, but i'll take a look in google), and for /dev/ttyACM0, the method will be udev (as with console.perms, I don't know how to do it).

If somebody can put examples for the two cases, I'll apreciate a lot.

Thanks

Mikkel L. Ellertson escribió:
Samuel Díaz García wrote:
Hi, I'm searching how-to use a script when I connect my webcam or my
movil USB cable.

For example, when I connect the USB movile cable, I need to put 666
permisions on /dev/ttyACM0 detected device, or when I plug-in my webcam
into my notebook, I need the same into /dev/video0 device.

Where I can add these scripts to allow all users to take control over
the pluged-in devices?

Thanks

Your /dev/video0 settings will get probably get overridden by
/etc/security/console.perms.d/50-default.perms. You could it with a
udev rule, but the first time you logged in/out with the device
plugged in, it would get changed. You are better off changing it
there - probably adding a local rule file. Check "man console.perms"
for some additional information. You can write a udev rule for USB
device that controls the permission of /dev/ttyACMx, or you could
write a console.perms rule that will take set the owner to the
person logged in at the console.

It would help if you explained exactly what you are after. You say
you want all users to be able to take control of the plugged in
devices. Do you want it to be whoever gets to the device first gets
control, or would giving control to whoever is logged at the machine
work out better? The second approach is the way FC5 is set up,
because you normaly have to be at the local machine to plug things
in. But I can see where you might want to control a plugged in
device remotely...

Mikkel

--
   Samuel Díaz García
    Director Gerente
ArcosCom Wireless, S.L.L.

CIF: B11828068
c/ Romero Gago, 19
Arcos de la Frontera
11630 - Cadiz

http://www.arcoscom.com

mailto:samueldg@xxxxxxxxxxxx
msn: samueldg@xxxxxxxxxxxx

Móvil: 651 93 72 48
Tlfn.: 956 70 13 15
Fax:   956 70 34 83


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux