[Sugar-devel] Permission problems and accessing usb dispositive
Paul Fox
pgf at laptop.org
Wed Jun 23 11:22:06 EDT 2010
james wrote:
> Alberto,
>
> Sugar Activities are restricted in what they can do by design. It
> would be better if you could make your Activity work within Sugar's
> restrictions.
>
> One thing that might work is to make a Journal entry out of your
> compiled code, with a suitable MIME type if there is one. That way
> you can use the Journal to copy the code to the USB-attached device.
>
> James Simmons
>
>
> > Date: Wed, 23 Jun 2010 09:03:58 -0300
> > From: Alberto Arruda de Oliveira <alberto.a.oliv at gmail.com>
> > Subject: [Sugar-devel] Permission problems and acessing usb
> > dispositive
> > To: sugar-devel at lists.sugarlabs.org
> > Message-ID:
> > <AANLkTikvdXsZmt8le1GzKQNb4I7jOWzlNmUjNV7ZTO11 at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > Hello again,
> >
> > First of all, I'd like to thank everyone that helped me on my other thread,
> > about adapting a software to run as an activity on XO. Thanks to you all, I
> > was able to do it.
> >
> > But now, I'm facing another problem regarding the permissions olpc user has
> > to access diferent dispositives on XO. The software I adapted uses the USB
> > port to communicate with an external module, to which it will send a
> > compiled code. It's an graphical programming tool, with the purpose of
> > robotics teaching. The problem is, since OLPC user doesn't have enough
> > permissions to access the ports, we can't send the compiled code to the
> > external module, unless we manually change the permissions to do so. So, my
> > question is, is there any way to do it without having to do it manually for
> > every machine we install or activity in ?
this has come up before, for the Scratch activity:
in the XO-1 case, the trick was for Scratch to add the
line "use-serial" to activity/permissions.info. this tells
rainbow that this activity can access serial ports. see:
http://wiki.laptop.org/go/Activity_bundles#activity.2Fpermissions.info
in the XO-1.5 case, making user "olpc" a member of group
"dialout" was the answer. USB serial devices are already
accessible by that group (though i can't at the moment find what
makes that happen), so this made everything okay.
if the "use-serial" trick isn't appropriate on XO-1 anymore, then
we could make user olpc a member of group uucp, if that's what you
say is needed, but that will only help on future s/w builds.
in particular, see the "use-serial" option. this is already in use by
Scratch, for access to USB serial modules. (i assume you module is
a serial device, given its uucp ownership.)
we really need to figure out how to make this problem more painless.
it came up the other day in the context of a new Lego peripheral that's
been integrated with Scratch. in this case the peripheral appears
as a HID device, and it's a bigger leap to simply make all HID devices
accessible to any user.
paul
> >
> > Just in case, the device our activity is trying to access is
> >
> > /dev/ttyACM0
> >
> > Using ls -l /dev/ttyACM0 we see that the its access permission is uucp while
> > the group of our activity is olpc.
> >
> > Using chmod o=rw /dev/ttyACM0 solves the problem.
> >
> > Thanks again
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
=---------------------
paul fox, pgf at laptop.org
More information about the Devel
mailing list