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

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Adam Holt-2
On Mon, Apr 9, 2018 at 11:54 PM, Tony Anderson <[hidden email]> 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 [hidden email].
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

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

Adam Holt-2
On Mon, Apr 9, 2018 at 11:54 PM, Tony Anderson <[hidden email]> wrote:
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.

'rm -rf /home/olpc/sugar/datastore' is not sufficient to accomplish the required task (deleting the child's Sugar name).

'rm /home/olpc/.sugar' is the only way we know.  (Unless there's a better approach ?)

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

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

Adam Holt-2
On Sun, Apr 15, 2018 at 6:58 PM, Adam Holt <[hidden email]> wrote:
On Mon, Apr 9, 2018 at 11:54 PM, Tony Anderson <[hidden email]> wrote:
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.

'rm -rf /home/olpc/sugar/datastore' is not sufficient to accomplish the required task (deleting the child's Sugar name).

'rm /home/olpc/.sugar' is the only way we know.  (Unless there's a better approach ?)

There are many similar suggestions here:
Which of the above are truly important for a teacher to type in at the beginning of the semester, to clean out Sugar on an XO.

Teachers much prefer something very short like "rm -rf /home/olpc/.sugar" (unless there's a better way?)


PS Naturally Gnome is not as easy to clean out, if students have left MP3's and personal files lying around!

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

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

James Cameron-2
In reply to this post by Adam Holt-2
OLPC OS on the XO is configured for ownership style "one laptop per
child".

If you always want to delete the child's Sugar name, you might either
change login scripts to delete it before starting, or assume a
default.  It simplifies getting started into a class.

e.g. in the OLPC OS 16.04 live build on the NL3, we have this in
/usr/bin/sugar;

    gsettings set org.sugarlabs.user nick 'You'
    gsettings set org.sugarlabs.user gender ''
    gsettings set org.sugarlabs.user birth-timestamp 689659403
    gsettings set org.sugarlabs.user group-label 'Adult'
    gsettings set org.sugarlabs.user color '#808080,#c0c0c0'
    gconftool-2 --set /desktop/sugar/user/color --type string '#808080,#c0c0c0'
    gconftool-2 --set /desktop/sugar/user/nick --type string 'You'

On Sun, Apr 15, 2018 at 06:58:11PM -0400, Adam Holt wrote:

> On Mon, Apr 9, 2018 at 11:54 PM, Tony Anderson <[1][hidden email]>
> wrote:
>
>     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.
>
> 'rm -rf /home/olpc/sugar/datastore' is not sufficient to accomplish the
> required task (deleting the child's Sugar name).
>
> 'rm /home/olpc/.sugar' is the only way we know.  (Unless there's a better
> approach ?)
>
> References:
>
> [1] mailto:[hidden email]

> _______________________________________________
> Devel mailing list
> [hidden email]
> http://lists.laptop.org/listinfo/devel


--
James Cameron
http://quozl.netrek.org/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

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

James Cameron-2
In reply to this post by Adam Holt-2
Which things are truly important depend on the circumstances, and only
the teacher will know.  For instance, without deleting the identity
key the activity collaboration feature will fail in strange ways.

On Sun, Apr 15, 2018 at 07:07:09PM -0400, Adam Holt wrote:

> On Sun, Apr 15, 2018 at 6:58 PM, Adam Holt <[1][hidden email]> wrote:
>
>     On Mon, Apr 9, 2018 at 11:54 PM, Tony Anderson <[2][hidden email]>
>     wrote:
>    
>         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.
>
>    
>     'rm -rf /home/olpc/sugar/datastore' is not sufficient to accomplish the
>     required task (deleting the child's Sugar name).
>
>     'rm /home/olpc/.sugar' is the only way we know.  (Unless there's a better
>     approach ?)
>
> There are many similar suggestions here:
>
>    [3]http://wiki.laptop.org/go/Imaging/Side_effects
>
> Which of the above are truly important for a teacher to type in at the
> beginning of the semester, to clean out Sugar on an XO.
>
> Teachers much prefer something very short like "rm -rf /home/olpc/.sugar"
> (unless there's a better way?)
>
> PS Naturally Gnome is not as easy to clean out, if students have left MP3's and
> personal files lying around!
>
> References:
>
> [1] mailto:[hidden email]
> [2] mailto:[hidden email]
> [3] http://wiki.laptop.org/go/Imaging/Side_effects

> _______________________________________________
> Server-devel mailing list
> [hidden email]
> http://lists.laptop.org/listinfo/server-devel


--
James Cameron
http://quozl.netrek.org/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

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

Adam Holt-2
On Thu, Apr 19, 2018 at 8:17 PM, James Cameron <[hidden email]> wrote:
without deleting the identity
key the activity collaboration feature will fail in strange ways.

What's the identity key, and how is it deleted?

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

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

James Cameron-2
On Thu, Apr 19, 2018 at 08:26:27PM -0400, Adam Holt wrote:
> On Thu, Apr 19, 2018 at 8:17 PM, James Cameron <[1][hidden email]> wrote:
>
>     without deleting the identity
>     key the activity collaboration feature will fail in strange ways.
>
> What's the identity key, and how is it deleted?

A cryptographic identitifier of the Sugar user, randomly created at
first boot and stored in files;

.sugar/default/owner.key and
.sugar/default/owner.key.pub

Delete it using rm, as it says here;
http://wiki.laptop.org/go/Imaging/Side_effects

"Otherwise the cloned laptops won't be able to collaborate using activities, or the wrong names will be shown in Chat,"

--
James Cameron
http://quozl.netrek.org/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel