[Sugar-devel] 0.96 Change?

Bert Freudenberg bert at freudenbergs.de
Tue Jun 5 11:27:29 EDT 2012


On 05.06.2012, at 10:04, Sascha Silbe wrote:

> Art Hunkins <abhunkin at uncg.edu> writes:
> 
>> I notice that for Sugar 0.96 it seems necessary, in copying a file from the 
>> Terminal to a USB stick, to do:
>>  cp myfile.py /run/media/liveuser/myUSB/myfile.py (perhaps I've got 
>> liveuser and myUSB reversed)
>> instead of the much simpler (in 0.94 and before):
>>  cp myfile.py /media/myUSB/myfile.py
>> (two new levels!)
> 
> That's a change on the distro level (Fedora resp. systemd in this case),
> not in Sugar. When running Sugar 0.96 on most other distros (that don't
> use systemd), it will still be /media/<medium name>. When running Sugar
> 0.94 (or really any version of Sugar) on Fedora 17, it will also be
> /run/media/<user name>/<medium name>. You can't derive the path to use
> From the Sugar version. For use in Activities, let me quote a recent
> mail of mine:
> 
>>> They should use proper API (gio on recent distros, HAL on old OLPC OS
>>> builds) rather than hardcoding paths. Check out the gio VolumeMonitor
>>> API documentation [1] and see _find_media() [2] in Backup [3] for an
>>> example (including fallback to HAL).
> 
> 
> [1] http://developer.gnome.org/gio/stable/GVolumeMonitor.html
> [2] https://git.sugarlabs.org/backup/mainline/blobs/master/backup.py#line671
> [3] http://activities.sugarlabs.org/en-US/sugar/addon/4326

I put that info into the documentation at

http://wiki.sugarlabs.org/go/Development_Team/Low-level_Activity_API#External_Media

- Bert -




More information about the Sugar-devel mailing list