[Sugar-devel] 0.96 Change?
Sascha Silbe
silbe at activitycentral.com
Tue Jun 5 04:04:52 EDT 2012
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).
For your personal use (inside the Terminal), you could make /media a
symlink to the new path to save you the additional typing:
sudo ln -s run/media/$USER /media
Sascha
[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
[4] message-id:toey5obxitl.fsf at twin.sascha.silbe.org
https://lists.sugarlabs.org/archive/sugar-devel/2012-May/037699.html
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120605/776c78d8/attachment-0001.pgp>
More information about the Sugar-devel
mailing list