Discussion:
[UKids] easiest way to automate install of a collection 12+ PDF's onto Sugar on XOs?
Adam Holt
2018-04-10 05:51:44 UTC
Permalink
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
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.
;)
pdf.sh
cp first.pdf /home/olpc/Library
cp second.pdf /home/olpc/Library
cp index.html /home/olpc/Library
poweroff
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.
function cpy(title) {
cp title /home/olpc/Library
}
cpy first.pdf
cpy second.pdf
cpy index.html
poweroff
Tony
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!*
--
---
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
For more options, visit https://groups.google.com/d/optout.
--
---
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
For more options, visit https://groups.google.com/d/optout.
--
Adam Holt
2018-04-15 22:58:11 UTC
Permalink
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 ?)*
Adam Holt
2018-04-15 23:07:09 UTC
Permalink
Post by Adam Holt
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:

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!
James Cameron
2018-04-20 00:17:56 UTC
Permalink
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.
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 ?)
   [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!
[3] http://wiki.laptop.org/go/Imaging/Side_effects
_______________________________________________
Server-devel mailing list
http://lists.laptop.org/listinfo/server-devel
--
James Cameron
http://quozl.netrek.org/
Adam Holt
2018-04-20 00:26:27 UTC
Permalink
Post by James Cameron
without deleting the identity
key the activity collaboration feature will fail in strange ways.
What's the identity key, and how is it deleted?
James Cameron
2018-04-20 05:34:38 UTC
Permalink
Post by James Cameron
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/
James Cameron
2018-04-20 00:15:51 UTC
Permalink
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'
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
http://lists.laptop.org/listinfo/devel
--
James Cameron
http://quozl.netrek.org/
Loading...