[UKids] easiest way to automate install of a collection 12+ PDF's onto Sugar on XOs?

Adam Holt holt at laptop.org
Tue Apr 10 01:51:44 EDT 2018


On Mon, Apr 9, 2018 at 11:54 PM, Tony Anderson <tony_anderson at usa.net>
wrote:

> As Bryan Berry once said: Don't use .xol. It is not implemented and will
> never be supported.
>
> The XO has very limited storage capacity. Last year, I implemented a
> 'roomserver'. Essentially this is a usb stick mounted on one XO in range of
> an ad hoc network. It uses SimpleHTTPServer to serve the content to XOs
> connected by an ad hoc network. This server works like an 'ls' command
> showing a list of files in the base directory -e.g. pdfs. If an index.html
> file is in the main folder, it is shown instead of the list. The url of an
> XO is shown in the frame. This can be used by other xo on that network
> using Browse. Enter: http://192.168.1.11:8008 where 8008 is the
> SimpleHTMLServer port.
>
> Currently Sugar provides /home/olpc/Library as the place to store this
> kind of document. It would be simple to prepare an index.html page with
> links to the pdfs. This html would be accessible by the file protocol:
> file:///home/olpc/Library/index.html. Alternatively the standard homepage
> for Browse is at /home/olpc/.library-pages so the links could be added to
> that page.
>
> Once a pdf is shown by Browse it can be downloaded to the Journal. From
> the Journal it can be resumed either by Read or by Browse. This assumes the
> pdf is downloaded from a server, not the XO. Otherwise, a second copy is
> made doubling the storage cost.
>
> A teacher should never 'rm -rf /home/olpc/.sugar'. If the intent is to
> remove the Journal because of space considerations, 'rm -rf
> /home/olpc/sugar/datastore' is sufficient. After this command the XO needs
> to be rebooted to create a new empty datastore.
>

I assume you mean 'rm -rf /home/olpc/.sugar/default/datastore' ?
Compare http://wiki.laptop.org/go/Imaging/Side_effects mentioned by James
Cameron's on Feb 19 @
http://lists.laptop.org/pipermail/devel/2018-February/038999.html

Thanks much Tony: this approach looks very promising.

We'll look at Tom Gilliard's approach too:
https://groups.google.com/d/msg/unleashkids/22cKusokstU/UTa49BEiAgAJ

Note: the current 'Journal is full' message is triggered when the unused
> space is less than 50MB and has nothing to do with the size of the Journal.
> Sadly, Sugar provides no way for the user to determine what should be
> removed (activities, content in folders such as Library, activity storage
> ('instance', 'data', 'tmp') or the datastore). Hence the standard technique
> of reflashing the XO. Another example of our developers with their terabyte
> Ubuntu machines who have no idea of the realities on the ground.
>

;)

The easiest and most straightforward approach is to use a bash script:
> pdf.sh
>
> cp first.pdf /home/olpc/Library
> cp second.pdf /home/olpc/Library
> cp index.html /home/olpc/Library
> poweroff
>
> with the Terminal activity:
>
> cd /run/media/olpc/usbstick
> bash pdf.sh
>
> This approach works with a set of usb sticks in factory mode since each XO
> shuts down allowing the stick to be moved to a waiting XO already booted.
>
> Some typing can be saved by using a bash function:
>
> function cpy(title) {
>    cp title /home/olpc/Library
> }
>
> with the script:
>
> cpy first.pdf
> cpy second.pdf
> cpy index.html
> poweroff
>
>
> Tony
>
>
> On Tuesday, 10 April, 2018 10:08 AM, Adam Holt wrote:
>
> Is building an .xol bundle/collection/file (containing all the PDF's) the
> easiest way?  What's the easiest way to build up an .xol of PDF's if so?
>
> Presumably by then installing the .xol in Sugar -> Terminal Activity as
> follows?
>
>    sugar-install-bundle /run/media/olpc/<USB DEVICE LABEL>/<BUNDLE.xo>
>
> Or is there much better ways to "permanently" install a large number of
> PDF's onto Sugar across a large number of XO laptops?  Or should we use
> Gnome instead of Sugar, if there's a much better way?  Sugar's Browse
> Activity is preferred (faster, lightweight) but Firefox 26.0 is also
> installed if absolutely necessary, in case either are needed instead of
> Sugar's Read Activity.
>
> CLARIF: The job will be done using USB memory sticks, walking from one XO
> laptop to the next, to install all these PDF's.
>
> CLARIF: We want the PDF's to remain on the XO laptops even after the
> teacher types in "rm -rf /home/olpc/.sugar" to clean out personal files
> from Sugar on each laptop, which typically happens at the beginning of each
> semester.
>
> CLARIF: A Sugar icon within the Sugar wheel would be a bonus, but any
> other method of finding this content within 3-to-5 clicks from Sugar's Home
> View can work Ok!
>
> CLARIF: these books need to be on the XO laptops themselves, as servers
> like IIAB are *not* always present.
>
> *Apologies there are serious electrical problems in Haiti where we're
> working, so it's very tough to fully research this online!*
> --
> Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !
> ---
> You received this message because you are subscribed to the Google Groups
> "Unleash Kids" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to unleashkids+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !
> ---
> You received this message because you are subscribed to the Google Groups
> "Unleash Kids" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to unleashkids+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20180410/b54b2080/attachment.html>


More information about the Devel mailing list