Re: [Sugar-devel] Datastore index corruption!

2010-07-29 Thread Gary Martin
On 29 Jul 2010, at 00:21, Bernie Innocenti ber...@codewiz.org wrote:

 (also filed as http://bugs.sugarlabs.org/ticket/2132, but let's keep the
 discussion on the mailing-list, please).
 
 Today we figured out one of the possibly many ways in which the index of
 the datastore can get corrupted in Sugar. 
 
 Here's an almost infallible recipe to reproduce it:
 
 1. open Write
 2. type something
 3. close Write
 4. wait a few seconds
 5. kill -9 the datastore process
 6. restart sugar (ctrl-alt-del)
 
 Your saved entry is gone. It still takes up space on disk, but it's no
 longer visible until you rebuild the index.
 
 Step 5 is just an artificial way to reproduce the problem. Other equally
 effective ways to trigger this data loss issue in the real-world include
 running out of battery, holding the power button for 4 seconds, and
 triggering the kernel out-of-memory killer.
 
 I'm sure the datastore could definitely work harder to prevent this type
 of data loss, by flushing the index immediately after an activity
 creates a new entry.
 
 Meanwhile, we're working on a work-around that will hopefully fix all
 problems of this sort: a Rescan or Reindex item on the Journal
 palette.

Unsurprisingly, a massive -1 from me, but you knew that was coming already! ;)

 I can already hear a big objection coming: this sort of geeky stuff has
 no place in the Sugar UI. True, but I see no alternative until we'll
 have a 100% reliable datastore that can fix itself in all cases of
 corruption.

Never going to happen, keep dreaming if you want, but it will only get better, 
never perfect. 

Regards,
--Gary 

 
 -- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/
 
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Datastore index corruption!

2010-07-29 Thread Bernie Innocenti
On Thu, 2010-07-29 at 15:50 +1000, James Cameron wrote:
 On Thu, Jul 29, 2010 at 01:39:45AM -0400, Bernie Innocenti wrote:
  On Thu, 2010-07-29 at 15:15 +1000, James Cameron wrote:
   Ugh.  So Write has terminated before data is saved?  That's bad.  Should
   it not wait for data to be fully saved?
  
  I believe data was saved, but the metadata index was not flushed to disk
  by the datastore process.
 
 Isn't that functionally identical to not saving data?

The effect is slightly different from not saving the data at all: it
uses up space in the filesystem :-)

Seriously, if you could force an index rebuild, you'd get to see the
hidden data.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Datastore index corruption!

2010-07-29 Thread Bernie Innocenti
On Thu, 2010-07-29 at 07:19 +0100, Gary Martin wrote:
  Meanwhile, we're working on a work-around that will hopefully fix all
  problems of this sort: a Rescan or Reindex item on the Journal
  palette.
 
 Unsurprisingly, a massive -1 from me, but you knew that was coming already! ;)

This was quite expected, but I was also hoping to get alternative
suggestions.


  I can already hear a big objection coming: this sort of geeky stuff has
  no place in the Sugar UI. True, but I see no alternative until we'll
  have a 100% reliable datastore that can fix itself in all cases of
  corruption.
 
 Never going to happen, keep dreaming if you want, but it will only get 
 better, never perfect. 

Which is why the Repair function ought to be there. My first impulse was
to make it hidden (ctrl-R in the Journal), but the others asked me how
would users get to discover it if it were hidden.

Remedies for OS bugs have historically been hidden: CTRL-ALT-DEL in
DOS/Windows, SHIFT+SHIFT to boot without extensions on System 7...
Overly optimistic engineers thought that users would never need to use
the secret key combos. Yet, somehow, 100% of users end up learning them
merely by word of mouth :-)

Now, if we don't want Sugar users to keep handing down the shell
incantation rm -rf .sugar, we'd better provide a less drastic remedy
in the UI.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Changing bundle_id and version scheme for Etoys

2010-07-29 Thread Bernie Innocenti
On Thu, 2010-07-29 at 00:23 -0400, C. Scott Ananian wrote:
 On Wed, Jul 28, 2010 at 12:06 PM, Bernie Innocenti ber...@codewiz.org wrote:
  There's no reason to have both a filename and a dbus-like name for the
  same thing. The former must already be unique on both distribution sites
  and in the Activities directory.
 
 I claim we should be using the dbus-like name for both distribution
 sites and in the Activities directory.

Then activity bundle files should be named like so?

   org.laptop.Browse-42.xo
   org.sugarlabs.Browse-666.xo


And their installed counterparts would look like these, correct?

   ~/Activities/org.laptop.Browse.activity
   ~/Activities/org.sugarlabs.Browse.activity

No version number, since we don't seem to allow parallel installation of
multiple instances of the very same activity, right?

If a developer takes over development of, say, org.laptop.Measure,
should the developer rename the bundle to org.codewiz.Measure or leave
it alone? In case of a rename, how do they ensure a smooth upgrade path?

Sorry to ask so many questions, but global uniqueness is a worthwhile
feature to have only if with well-defined semantics and a clear purpose.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Datastore index corruption!

2010-07-29 Thread Bernie Innocenti
On Thu, 2010-07-29 at 17:26 +1000, James Cameron wrote:
 How harmless is it?  If quite harmless, why can't it be included in the
 startup of the datastore?

Reindexing takes time proportional to the number of objects in the
datastore.

With a full journal, it can take 30-60 seconds on an XO-1.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Datastore index corruption!

2010-07-29 Thread James Cameron
On Thu, Jul 29, 2010 at 03:53:56AM -0400, Bernie Innocenti wrote:
 On Thu, 2010-07-29 at 17:26 +1000, James Cameron wrote:
  How harmless is it?  If quite harmless, why can't it be included in the
  startup of the datastore?
 
 Reindexing takes time proportional to the number of objects in the
 datastore.
 
 With a full journal, it can take 30-60 seconds on an XO-1.

Does this block other activity, or can it be done without impact to user
operations on the journal?

This 30-60 seconds; how much of that is CPU time, and how much is I/O
wait?

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] touchpad section for Sugar Control Panel

2010-07-29 Thread pbrobin...@gmail.com
On Wed, Jul 28, 2010 at 3:41 PM, Sascha Silbe
sascha-ml-ui-sugar-de...@silbe.org wrote:
 Excerpts from Paul Fox's message of Wed Jul 28 16:01:22 +0200 2010:
 sascha wrote:
   Even your latest patch still contains code that is specific to OLPC 
 builds and will break on other systems.
   Of course it's perfectly fine for you to say you only care about OLPC 
 builds for XO-1 (because the number of XO-1s running non-OLPC builds is 
 minimal, especially if you don't count developers). But in that case your 
 patch should be included in the OLPC builds, not in Sugar mainline.

 can you remind me of the specific issue(s) here?
 I can remember two issues (there might be others as well):
 - hardcoded, absolute path (/home/olpc/whatever)

I agree that it shouldn't ever user /home/olpc as hardcoded. At least
you ~/.olpc-blah as it will then work on what ever distro and what
ever user. I'm not sure of the general standard to use for this.

Peter
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] sugar-datastore component in trac

2010-07-29 Thread Bernie Innocenti
On Thu, 2010-07-29 at 10:06 +0200, Tomeu Vizoso wrote:
 On Thu, Jul 29, 2010 at 07:13, Bernie Innocenti ber...@codewiz.org wrote:
  I opened a new ticket (sl#2132) on the sugar-datastore component and it
  was automatically assigned to tomeu. I would have expected it to go to
  silbe instead.
 
 Should have gone to Aleksey as per
 http://wiki.sugarlabs.org/go/Development_Team/Release/Modules

Ok, I updated trac.

BTW, information on who maintains what is quite redundant... we have the
wiki, wrac, gitorious and the MAINTAINERS file.

Trac and Gitorious do not let you specify multiple people, so we can't
use them as the authoritative source. The MAINTAINERS file, however, is
a well-known standard in free software.

On the other hand, out-of-band documentation about a project tends to be
harder to find for new contributors. I did not know about the Modules
page in our wiki until I asked on the mailing list, not long ago.

So my proposal is: consolidate all information on the MAINTAINERS file
and prominently mark the wiki page as obsolete.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Datastore index corruption!

2010-07-29 Thread Bernie Innocenti
On Thu, 2010-07-29 at 19:15 +1000, James Cameron wrote:

 Does this block other activity, or can it be done without impact to user
 operations on the journal?

The journal icon does not show up in the frame until the indexing is
finished and no journal operations are possible. So, I guess, you also
cannot open activities.


 This 30-60 seconds; how much of that is CPU time, and how much is I/O
 wait?

Don't know, I'd have to measure with a full journal...

Even without testing I have a very strong feeling that automatic
reindexing on every boot won't be a feasible path. Perhaps we could
perform full reindexing every N boots, like fsck on old Linux systems?
Naa... users would be annoyed by the useless occasional delay and would
demand a button to fix their journal when they know that some data has
been lost.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Audacity under Sugar

2010-07-29 Thread Daniel Castelo
In this page you could find a sugarized version of audacity
http://wiki.laptop.org/go/Activities/All

I dont know if this bundle has all the feature of the last audacity.

On Thu, Jul 29, 2010 at 12:34 AM, Sean Linton s...@lpnz.org wrote:

 Dear All,

 I am working on a conference presentation on ICT enabled networking
 for indigenous music foundations. I have been working on some ideas
 with David Leeming who as supplied me with an XO machine while I try
 to work some things out on it.

 We are looking at the potential for using Audacity as a tool to help
 enable and create content for community radio stations. The idea being
 that the XO can be used to record audio an then send low latency audio
 code to the radio hub as oggs or mp3s.

 I have installed audacity using

 yum install audacity

 It is no problem for me to run audacity' from the command line,
 however I am aware that OLPC developers are trying to keep the sugar
 gui.

 I have been also trying to find the lame libraries to enble the mp3
 export function, but have limited success adjusting the
 /etc/yum.repos.d or /etc/yum.conf files. I think I need to access the
 ubuntu multiverse? I have no problem working in .ogg format but I am
 not sure if everyone feels that way?

 I would be interested in using the 'sugarize' script that you wrote to
 give audacity 'activity' status, with icon, and journal compatability.

 Would you be able to discuss with me how to sugarize audacity, or walk
 me through your script? Audacity has options for saving files; the
 save function creates a file that only audacity can read (aup).
 Mp3/Wav/Au/Ogg require export. Perhaps the *aup file would be useful
 for journal use, eg. by chmod -x ( asigning it executble status have
 it run audacity from journal?  )

 I have also been looking at introducing new insruments to the
 tamtam suites, ethnic instruments based on the local instruments of
 the XO distributions, eg Panpipes on Tamtam for computers in the
 Solomon Islands? Can you suggest a way to implement this?


 Sincerely

 Sean Linton
 Ph D Student
 Otago University
 Music Department
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




-- 
Ing. Daniel Castelo
Plan Ceibal - Área Técnica
Avda. Italia 6201
Montevideo - Uruguay.
Tel.: 601.57.73 Interno 2228
E-mail : dcast...@plan.ceibal.edu.uy
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Datastore index corruption!

2010-07-29 Thread Gary Martin
On 29 Jul 2010, at 15:10, Bernie Innocenti ber...@codewiz.org wrote:

 On Thu, 2010-07-29 at 19:15 +1000, James Cameron wrote:
 
 Does this block other activity, or can it be done without impact to user
 operations on the journal?
 
 The journal icon does not show up in the frame until the indexing is
 finished and no journal operations are possible. So, I guess, you also
 cannot open activities.
 
 This 30-60 seconds; how much of that is CPU time, and how much is I/O
 wait?
 
 Don't know, I'd have to measure with a full journal...
 
 Even without testing I have a very strong feeling that automatic
 reindexing on every boot won't be a feasible path. Perhaps we could
 perform full reindexing every N boots, like fsck on old Linux systems?
 Naa... users would be annoyed by the useless occasional delay and would
 demand a button to fix their journal when they know that some data has
 been lost.

OK... Here's a horrible kludge, but I think it's less of a horrible kludge than 
placing a big 'click this if you think random s##t has happened' button in one 
of our primary UIs. 

Make a new control panel for such admin/maintenance actions, FWIW to set the 
scene, in other OSs I'd imagine this as part of some sort of manual disk fix, 
validate, repair, check, backup, tool. So let's say we have a new cog icon CP 
module, there is now plenty of space in there to add some sane explanatory 
text, and a clear text button. It would set a flag, and then reboot the the 
machine with the usual dialogue as per some other CP modules, rebuild of index 
would then be done at boot time (so you don't cause even more of a problem as 
random open activities die and possibly loose users work). Deployments can then 
choose to include this CP module in their build or not, and I'd guess it stands 
a better chance of getting upstreamed.   

I'd still much rather see the effort go into addressing the actual underlying 
issue, but you did ask for suggestions ;)

Regards,
--Gary

 -- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/
 
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Home view activities layout

2010-07-29 Thread Chris Ball
Hi,

At the moment Sugar's enabling the freeform and circle layouts, but
the code (jarabe/desktop/favoritesview.py) also defines (and then
comments out) triangle, box and sunflower layouts.  The circle
algorithm isn't scaling well as we install more and more activities.

Any suggestions on an algorithm to replace circle with?  I tried out
sunflower, but it's a bit messy and hard to navigate through.

Also, should we re-enable the commented out layouts?

Thanks,

- Chris.
-- 
Chris Ball   c...@laptop.org
One Laptop Per Child
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Home view activities layout

2010-07-29 Thread Walter Bender
On Thu, Jul 29, 2010 at 3:45 PM, Chris Ball c...@laptop.org wrote:
 Hi,

 At the moment Sugar's enabling the freeform and circle layouts, but
 the code (jarabe/desktop/favoritesview.py) also defines (and then
 comments out) triangle, box and sunflower layouts.  The circle
 algorithm isn't scaling well as we install more and more activities.

 Any suggestions on an algorithm to replace circle with?  I tried out
 sunflower, but it's a bit messy and hard to navigate through.

I'm still a fan of the sunflower, but a spiral such as I describe in
the FLOSS manual maybe  a nice compromise.

See http://en.flossmanuals.net/Sugar/ModifyingSugar (towards the
bottom of the page).

-walter


 Also, should we re-enable the commented out layouts?

 Thanks,

 - Chris.
 --
 Chris Ball   c...@laptop.org
 One Laptop Per Child
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Sugar Digest 2010-07-29

2010-07-29 Thread Walter Bender
== Sugar ==

1. Squeakfest Part II: The final day of Squeakfest as was uplifting as
my first day at the conference. There were reports from the field
using Etoys and many oh-the-things-you-can-do presentations by
teachers who use Etoys in the classroom. There was a nice mix of
projects built by learners – an amazing physics model built by
high-school students in North Carolina was a highlight – as well as
projects intended to let a learner explore a powerful idea – a
beautiful-in-its-simplicity model for estimating the area of a circle;
these small projects – Etoy-lets – are being shared on line along
with an extensive collection of simple guides to using Etoys. Again I
was impressed by the extensive use of flaps and books that are created
as part of the project generation process and the use of versioning to
monitor a learner's progress. These facilities represent a major
usability improvement in Etoys in support of pedagogical goals. Etoys
is great stuff, well worth the initial investment in time and effort
to learn.

2. I contrast this with the sad state of the computer industry's
attempts to sell computers to schools: [] says teachers need high-end
laptops but students will just be accessing content and communication
so need basic functionality. While there is nothing fundamentally
wrong with giving children access to content, does that really
constitute the basic functionality needed by the learner? The good
news is that Sugar (and Etoys) can run on these basic platforms. We
should stop selling teachers and learning short by dumbing down the
opportunities to use computation as a thing to think with.

3. Christoph Derndorfer, who is on another of his world-wide tours of
OLPC deployments – this time to Latin America – just reposted a link
to Michael Trucano's restating-the-obvious article on 1-to-1 laptop
deployment pitfalls on the World Bank's website. (Most of Trucano's
well-worn advise applies to any learning initiative; alas, he does not
provide much insight for those of us trying to actually solve real
problems on the ground.) I will give Christoph the benefit of doubt
that with the coincidence of his post that he is not deliberately
making a backhanded disparagement of the deployments in Uruguay and
Paraguay he has visited. While these deployments have not yet reached
the status perfection, the deployment teams at Ceibal and Paraguay
Educa have never strayed into the dangerous waters described by
Trucano:

   1. Dump hardware in schools, hope for magic to happen
   Far from it, there have been extensive support mechanisms in place
in .ur and .py from Day One

   2. Design for OECD learning environments, implement elsewhere
   While there is some sharing of content and best practice, it is the
local pedagogical team that calls the shots in both deployments.

   3. Think about educational content only after you have rolled out
your hardware
   Again, pedagogy has driven the pace of deployment. At the same
time, the entire deployment has been thought of within the context of
a learning platform, which includes laptops, connectivity, servers,
training, content development, documentation, support, community
outreach, etc.

   4. Assume you can just import content from somewhere else
   The key here is just. Both .uy and .py think deeply about
content, but they are also opportunistic – taking advantage of great
content developed elsewhere, for example, by the Etoys community.

   5. Don't monitor, don't evaluate
   At Ceibal, they have an extensive operation for monitoring the
state of the network, servers, and laptops within their deployment.
There are numerous ongoing evaluations of the program, both internal
and external. Paraguay Educa was the subject of an external evaluation
by the IADB, which issued a very positive report.

   6. Make a big bet on an unproven technology (especially one based
on a  closed/proprietary standard) or single vendor, don't plan for
how to avoid 'lock-in
   Both programs have used a open bidding process and have some
percentage of hardware from multiple vendors. Both programs use Free
Software.

   7. Don't think about (or acknowledge) total cost of
ownership/operation issues or calculations
   .uy has been diligent in publishing their total-cost-of-ownership
numbers – these numbers, based upon the costs measured in the field
happen to be much less than the inflated numbers fabricated by
naysayers.

   8. Assume away equity issues
   While no one is claiming that equity issues are no longer a
concern, the fact that the per-household penetration of computing in
.uy is inversely proportional to household income says a lot. And in
every one of these households, the children have free Internet access.
Wow.

   9. Don't train your teachers (nor your school headmasters, for that matter)
   The biggest investment in the .py program has been in teacher
training. As the project scales, finding ways to make this process
more efficient will be key. But no one has every suggested 

Re: [Sugar-devel] Home view activities layout

2010-07-29 Thread Gary Martin
On 29 Jul 2010, at 20:45, Chris Ball c...@laptop.org wrote:

 Hi,
 
 At the moment Sugar's enabling the freeform and circle layouts, but
 the code (jarabe/desktop/favoritesview.py) also defines (and then
 comments out) triangle, box and sunflower layouts.  The circle
 algorithm isn't scaling well as we install more and more activities.
 
 Any suggestions on an algorithm to replace circle with?  I tried out
 sunflower, but it's a bit messy and hard to navigate through.
 
 Also, should we re-enable the commented out layouts?

+1, always thought that was a nice way to personalise Sugar.

Regards,
--Gary

 Thanks,
 
 - Chris.
 -- 
 Chris Ball   c...@laptop.org
 One Laptop Per Child
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release Turtle Blocks-92

2010-07-29 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4027

Sugar Platform:
0.82 - 0.88

Download Now:
http://activities.sugarlabs.org/downloads/file/27002/turtle_art-92.xo

Release notes:
fixed sharing bug introduced in v91


Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] touchpad section for Sugar Control Panel

2010-07-29 Thread Walter Bender
On Thu, Jul 29, 2010 at 6:27 AM, pbrobin...@gmail.com
pbrobin...@gmail.com wrote:
 On Wed, Jul 28, 2010 at 3:41 PM, Sascha Silbe
 sascha-ml-ui-sugar-de...@silbe.org wrote:
 Excerpts from Paul Fox's message of Wed Jul 28 16:01:22 +0200 2010:
 sascha wrote:
   Even your latest patch still contains code that is specific to OLPC 
 builds and will break on other systems.
   Of course it's perfectly fine for you to say you only care about OLPC 
 builds for XO-1 (because the number of XO-1s running non-OLPC builds is 
 minimal, especially if you don't count developers). But in that case your 
 patch should be included in the OLPC builds, not in Sugar mainline.

 can you remind me of the specific issue(s) here?
 I can remember two issues (there might be others as well):
 - hardcoded, absolute path (/home/olpc/whatever)

 I agree that it shouldn't ever user /home/olpc as hardcoded. At least
 you ~/.olpc-blah as it will then work on what ever distro and what
 ever user. I'm not sure of the general standard to use for this.

How's this look?

35,36c35,36
 # FLAG_PATH is used to preserve status between boots.
 FLAG_PATH = '/home/olpc/.olpc-pentablet-mode'
---
 # FLAG_FILE is used to preserve status between boots.
 FLAG_FILE = '.olpc-pentablet-mode'
123a124
 _flag_path = os.join(os.environ['HOME'], FLAG_FILE)
125,126c126,127
 if os.path.exists(FLAG_PATH):
 os.remove(FLAG_PATH)
---
 if os.path.exists(_flag_path):
 os.remove(_flag_path)
128c129
 flag_file_handle = open(FLAG_PATH, 'w')
---
 flag_file_handle = open(_flag_path, 'w')

-walter

 Peter
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Datastore index corruption!

2010-07-29 Thread Bernie Innocenti
On Wed, 2010-07-28 at 19:21 -0400, Bernie Innocenti wrote:
 Here's an almost infallible recipe to reproduce it:
 
 1. open Write
 2. type something
 3. close Write
 4. wait a few seconds
 5. kill -9 the datastore process
 6. restart sugar (ctrl-alt-del)
 
 Your saved entry is gone. It still takes up space on disk, but it's no
 longer visible until you rebuild the index.

We figured out that the datastore delays writes to disk by about 60
seconds. This braindead behavior appears to be a *designed*
optimization!

Is it in Rarian or in the datastore code itelf? How do we change it to a
sane 2-3 seconds delay?

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] touchpad section for Sugar Control Panel

2010-07-29 Thread Paul Fox
walter wrote:
  On Thu, Jul 29, 2010 at 6:27 AM, pbrobin...@gmail.com
  pbrobin...@gmail.com wrote:
   On Wed, Jul 28, 2010 at 3:41 PM, Sascha Silbe
   sascha-ml-ui-sugar-de...@silbe.org wrote:
   Excerpts from Paul Fox's message of Wed Jul 28 16:01:22 +0200 2010:
   sascha wrote:
 Even your latest patch still contains code that is specific to OLPC 
  builds and will break on other systems.
 Of course it's perfectly fine for you to say you only care about OLPC 
  builds for XO-1 (because the number of XO-1s running non-OLPC builds is 
  minimal, especially if you don't count developers). But in that case your 
  patch 
  should be included in the OLPC builds, not in Sugar mainline.
  
   can you remind me of the specific issue(s) here?
   I can remember two issues (there might be others as well):
   - hardcoded, absolute path (/home/olpc/whatever)
  
   I agree that it shouldn't ever user /home/olpc as hardcoded. At least
   you ~/.olpc-blah as it will then work on what ever distro and what
   ever user. I'm not sure of the general standard to use for this.
  
  How's this look?

walter -- i didn't think of this when we were designing all of
this:  how about if, in addition to this patch, you checked at sugar
startup time and used the presence of that file in $HOME as an
indication that you should set ptmode for the user?  then i could
eliminate a chunk of the code from olpc-utils that sascha was
complaining about.

btw -- i just looked at your patch again -- what happens if
NODE_PATH can't be opened for writing?  write_touchpad_mode()
should fail gracefully in that case.  making the node writeable
is the one line of code that will need to remain external to
sugar, and we shouldn't assume that it has happened.  i'm
referring to this:

+def write_touchpad_mode(touchpad):
+ Write the touchpad mode to the node path and set/unset the flag. 

+touchpad_mode_index = TOUCHPAD_MODES.index(touchpad)
+
+node_file_handle = open(NODE_PATH, 'w')
+node_file_handle.write(str(touchpad_mode_index))
+node_file_handle.close()
+
+if touchpad_mode_index == 0:
+if os.path.exists(FLAG_PATH):
+os.remove(FLAG_PATH)
+else:
+flag_file_handle = open(FLAG_PATH, 'w')
+flag_file_handle.close()

paul


  
  35,36c35,36
   # FLAG_PATH is used to preserve status between boots.
   FLAG_PATH = '/home/olpc/.olpc-pentablet-mode'
  ---
   # FLAG_FILE is used to preserve status between boots.
   FLAG_FILE = '.olpc-pentablet-mode'
  123a124
   _flag_path = os.join(os.environ['HOME'], FLAG_FILE)
  125,126c126,127
   if os.path.exists(FLAG_PATH):
   os.remove(FLAG_PATH)
  ---
   if os.path.exists(_flag_path):
   os.remove(_flag_path)
  128c129
   flag_file_handle = open(FLAG_PATH, 'w')
  ---
   flag_file_handle = open(_flag_path, 'w')
  
  -walter
  
   Peter
   ___
   Sugar-devel mailing list
   Sugar-devel@lists.sugarlabs.org
   http://lists.sugarlabs.org/listinfo/sugar-devel
  
  
  
  
  -- 
  Walter Bender
  Sugar Labs
  http://www.sugarlabs.org
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel

=-
 paul fox, p...@laptop.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Remove hard-coded School Server URL when XOs register #sl1976

2010-07-29 Thread Bernie Innocenti
On Sun, 2010-07-04 at 10:33 +1200, Tim McNamara wrote:
 Hi there,

 Ref http://bugs.sugarlabs.org/ticket/1976

 Bevaviour of the software is now independent of the hardware that
 Sugar is running. All registrations will look for Jabber server
 settings from /desktop/sugar/collaboration/jabber_server. However,
 this patch retains the REGISTER_URL as an option for systems
 administrators. This prevents currently written documentation for the
 XS / XO registration from breaking.

In order to keep the old behavior, this patch would also need to set the
default value of /desktop/sugar/collaboration/jabber_server to
schoolserver. Also, the lines else: url = url in your patch seem
redundant.

Another tip: sending patches as plain text (as opposed to attachments)
makes it easier to review them inline. The combination of git
format-patch plus git send-email does the right thing.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-29 Thread Bernie Innocenti
On Thu, 2010-07-29 at 01:12 +0530, anishmangal2002 wrote:
 This patch adds an icon to the frame, whose palette
 menu displays the memory and cpu resources. For computing
 free memory, the code reads the /proc/meminfo file (thanks
 quozl) and for computing cpu usage, the code reads the
 /proc/stat file.
 
 The frame icon is updated after every 5 seconds if required.
 Similarly, the palette menu entries are updated after every
 5 seconds as well.
 
 Signed-off-by: anishmangal2002 anishmangal2...@gmail.com

Merged in Dextrose, thanks.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Audacity under Sugar

2010-07-29 Thread Sean Linton
The audacity.xo download is not loading on the computer I have.
Is it known to work elsewhere?

I am on:
build 802
Sugar 0.82.1
Firmware Q2E41

On 30/07/2010, Daniel Castelo dcast...@plan.ceibal.edu.uy wrote:
 In this page you could find a sugarized version of audacity
 http://wiki.laptop.org/go/Activities/All

 I dont know if this bundle has all the feature of the last audacity.

 On Thu, Jul 29, 2010 at 12:34 AM, Sean Linton s...@lpnz.org wrote:

 Dear All,

 I am working on a conference presentation on ICT enabled networking
 for indigenous music foundations. I have been working on some ideas
 with David Leeming who as supplied me with an XO machine while I try
 to work some things out on it.

 We are looking at the potential for using Audacity as a tool to help
 enable and create content for community radio stations. The idea being
 that the XO can be used to record audio an then send low latency audio
 code to the radio hub as oggs or mp3s.

 I have installed audacity using

 yum install audacity

 It is no problem for me to run audacity' from the command line,
 however I am aware that OLPC developers are trying to keep the sugar
 gui.

 I have been also trying to find the lame libraries to enble the mp3
 export function, but have limited success adjusting the
 /etc/yum.repos.d or /etc/yum.conf files. I think I need to access the
 ubuntu multiverse? I have no problem working in .ogg format but I am
 not sure if everyone feels that way?

 I would be interested in using the 'sugarize' script that you wrote to
 give audacity 'activity' status, with icon, and journal compatability.

 Would you be able to discuss with me how to sugarize audacity, or walk
 me through your script? Audacity has options for saving files; the
 save function creates a file that only audacity can read (aup).
 Mp3/Wav/Au/Ogg require export. Perhaps the *aup file would be useful
 for journal use, eg. by chmod -x ( asigning it executble status have
 it run audacity from journal?  )

 I have also been looking at introducing new insruments to the
 tamtam suites, ethnic instruments based on the local instruments of
 the XO distributions, eg Panpipes on Tamtam for computers in the
 Solomon Islands? Can you suggest a way to implement this?


 Sincerely

 Sean Linton
 Ph D Student
 Otago University
 Music Department
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




 --
 Ing. Daniel Castelo
 Plan Ceibal - Área Técnica
 Avda. Italia 6201
 Montevideo - Uruguay.
 Tel.: 601.57.73 Interno 2228
 E-mail : dcast...@plan.ceibal.edu.uy

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Audacity under Sugar

2010-07-29 Thread Daniel Castelo
Try installing this package: *compat-expat1
*
On Thu, Jul 29, 2010 at 7:33 PM, Sean Linton s...@lpnz.org wrote:

 The audacity.xo download is not loading on the computer I have.
 Is it known to work elsewhere?

 I am on:
 build 802
 Sugar 0.82.1
 Firmware Q2E41

 On 30/07/2010, Daniel Castelo dcast...@plan.ceibal.edu.uy wrote:
  In this page you could find a sugarized version of audacity
  http://wiki.laptop.org/go/Activities/All
 
  I dont know if this bundle has all the feature of the last audacity.
 
  On Thu, Jul 29, 2010 at 12:34 AM, Sean Linton s...@lpnz.org wrote:
 
  Dear All,
 
  I am working on a conference presentation on ICT enabled networking
  for indigenous music foundations. I have been working on some ideas
  with David Leeming who as supplied me with an XO machine while I try
  to work some things out on it.
 
  We are looking at the potential for using Audacity as a tool to help
  enable and create content for community radio stations. The idea being
  that the XO can be used to record audio an then send low latency audio
  code to the radio hub as oggs or mp3s.
 
  I have installed audacity using
 
  yum install audacity
 
  It is no problem for me to run audacity' from the command line,
  however I am aware that OLPC developers are trying to keep the sugar
  gui.
 
  I have been also trying to find the lame libraries to enble the mp3
  export function, but have limited success adjusting the
  /etc/yum.repos.d or /etc/yum.conf files. I think I need to access the
  ubuntu multiverse? I have no problem working in .ogg format but I am
  not sure if everyone feels that way?
 
  I would be interested in using the 'sugarize' script that you wrote to
  give audacity 'activity' status, with icon, and journal compatability.
 
  Would you be able to discuss with me how to sugarize audacity, or walk
  me through your script? Audacity has options for saving files; the
  save function creates a file that only audacity can read (aup).
  Mp3/Wav/Au/Ogg require export. Perhaps the *aup file would be useful
  for journal use, eg. by chmod -x ( asigning it executble status have
  it run audacity from journal?  )
 
  I have also been looking at introducing new insruments to the
  tamtam suites, ethnic instruments based on the local instruments of
  the XO distributions, eg Panpipes on Tamtam for computers in the
  Solomon Islands? Can you suggest a way to implement this?
 
 
  Sincerely
 
  Sean Linton
  Ph D Student
  Otago University
  Music Department
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 
 
 
 
  --
  Ing. Daniel Castelo
  Plan Ceibal - Área Técnica
  Avda. Italia 6201
  Montevideo - Uruguay.
  Tel.: 601.57.73 Interno 2228
  E-mail : dcast...@plan.ceibal.edu.uy
 




-- 
Ing. Daniel Castelo
Plan Ceibal - Área Técnica
Avda. Italia 6201
Montevideo - Uruguay.
Tel.: 601.57.73 Interno 2228
E-mail : dcast...@plan.ceibal.edu.uy
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Datastore index corruption!

2010-07-29 Thread James Cameron
On Thu, Jul 29, 2010 at 05:01:32PM -0400, Bernie Innocenti wrote:
 We figured out that the datastore delays writes to disk by about 60
 seconds. This braindead behavior appears to be a *designed*
 optimization!

I recall encountering something like this last week.  The test case was
to start Record, press the shutter trigger (O game key) once a second
for two minutes, then switching to Journal while watching with dstat
over ssh.  The rate of Journal entry creation vs the disk activity over
time was unexpected to me.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Home view activities layout

2010-07-29 Thread James Cameron
On Thu, Jul 29, 2010 at 03:57:35PM -0400, Walter Bender wrote:
 See http://en.flossmanuals.net/Sugar/ModifyingSugar (towards the
 bottom of the page).

+1 on the spiral.

Also, that page suggests vi, but current builds include gedit which is
much easier.  The files have also moved.

sudo gedit
/usr/lib/python2.6/site-packages/jarabe/desktop/favoritesview.py

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Home view activities layout

2010-07-29 Thread Chris Ball
Hi,

On Thu, Jul 29, 2010 at 03:57:35PM -0400, Walter Bender wrote:
See http://en.flossmanuals.net/Sugar/ModifyingSugar (towards the
bottom of the page).

+1 on the spiral.

I like it too.  I'm worried that it would scale badly, but Walter
suggested just tightening the spiral, and that sounds good to me.

Is anyone on the Design Team reading?  What would it take to move
forward with (a) including spiral, and (b) making it default?
Should we ask for input from deployments, too?

Also, how would people feel about a patch that:
  * allows drag and drop when in a non-freeform view
  * if an icon is moved while in a non-freeform view, the current
layout switches to freeform, and the position of all the
activities is saved as the base for the new freeform
configuration.

(So, going to spiral, dragging one icon out of place would enable
freeform -- overwriting any previous freeform configuration -- then
going back to spiral using the layout menu would put all icons in
their spiral place, then manually going back to freeform using the
menu would restore you to spiral with the one activity you moved
back in the place you moved it to.  Hope that made sense.)

Thanks!

- Chris.
-- 
Chris Ball   c...@laptop.org
One Laptop Per Child
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Audacity under Sugar

2010-07-29 Thread Sean Linton
OK, that has Audacity loading as an activity icon.
Great, Thanks.
Any joy on the libmp3lame.so resolution?

. . .Dependencies Resolved


 PackageArch  Version   RepositorySize

Installing:
 compat-expat1  i386  1.95.8-4  fedora 65 k

Transaction Summary

Install  1 Package(s)
Update   0 Package(s)
Remove   0 Package(s)

Total download size: 65 k
Is this ok [y/N]: y
Downloading Packages:
compat-expat1-1.95.8-4.i386.rpm
   |  65 kB 00:11
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : compat-expat1 [1/1]
error: Couldn't fork %post: Cannot allocate memory

Installed: compat-expat1.i386 0:1.95.8-4
Complete!


On 30/07/2010, Daniel Castelo dcast...@plan.ceibal.edu.uy wrote:
 Try installing this package: *compat-expat1
 *
 On Thu, Jul 29, 2010 at 7:33 PM, Sean Linton s...@lpnz.org wrote:

 The audacity.xo download is not loading on the computer I have.
 Is it known to work elsewhere?

 I am on:
 build 802
 Sugar 0.82.1
 Firmware Q2E41

 On 30/07/2010, Daniel Castelo dcast...@plan.ceibal.edu.uy wrote:
  In this page you could find a sugarized version of audacity
  http://wiki.laptop.org/go/Activities/All
 
  I dont know if this bundle has all the feature of the last audacity.
 
  On Thu, Jul 29, 2010 at 12:34 AM, Sean Linton s...@lpnz.org wrote:
 
  Dear All,
 
  I am working on a conference presentation on ICT enabled networking
  for indigenous music foundations. I have been working on some ideas
  with David Leeming who as supplied me with an XO machine while I try
  to work some things out on it.
 
  We are looking at the potential for using Audacity as a tool to help
  enable and create content for community radio stations. The idea being
  that the XO can be used to record audio an then send low latency audio
  code to the radio hub as oggs or mp3s.
 
  I have installed audacity using
 
  yum install audacity
 
  It is no problem for me to run audacity' from the command line,
  however I am aware that OLPC developers are trying to keep the sugar
  gui.
 
  I have been also trying to find the lame libraries to enble the mp3
  export function, but have limited success adjusting the
  /etc/yum.repos.d or /etc/yum.conf files. I think I need to access the
  ubuntu multiverse? I have no problem working in .ogg format but I am
  not sure if everyone feels that way?
 
  I would be interested in using the 'sugarize' script that you wrote to
  give audacity 'activity' status, with icon, and journal compatability.
 
  Would you be able to discuss with me how to sugarize audacity, or walk
  me through your script? Audacity has options for saving files; the
  save function creates a file that only audacity can read (aup).
  Mp3/Wav/Au/Ogg require export. Perhaps the *aup file would be useful
  for journal use, eg. by chmod -x ( asigning it executble status have
  it run audacity from journal?  )
 
  I have also been looking at introducing new insruments to the
  tamtam suites, ethnic instruments based on the local instruments of
  the XO distributions, eg Panpipes on Tamtam for computers in the
  Solomon Islands? Can you suggest a way to implement this?
 
 
  Sincerely
 
  Sean Linton
  Ph D Student
  Otago University
  Music Department
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 
 
 
 
  --
  Ing. Daniel Castelo
  Plan Ceibal - Área Técnica
  Avda. Italia 6201
  Montevideo - Uruguay.
  Tel.: 601.57.73 Interno 2228
  E-mail : dcast...@plan.ceibal.edu.uy
 




 --
 Ing. Daniel Castelo
 Plan Ceibal - Área Técnica
 Avda. Italia 6201
 Montevideo - Uruguay.
 Tel.: 601.57.73 Interno 2228
 E-mail : dcast...@plan.ceibal.edu.uy

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Audacity under Sugar

2010-07-29 Thread James Cameron
On Fri, Jul 30, 2010 at 12:19:59PM +1100, Sean Linton wrote:
 Any joy on the libmp3lame.so resolution?

I'm curious.  Have you tried http://www.rpmfusion.org/Configuration for
Fedora 11?

 Running Transaction
   Installing : compat-expat1 [1/1]
 error: Couldn't fork %post: Cannot allocate memory
 
 Installed: compat-expat1.i386 0:1.95.8-4
 Complete!

You were lucky to get that install completed.  There was such a shortage
of memory that a post-installation script could not be started.  Either
it retried or continued regardless.

You can reduce the chances of this happening by:

1.  reducing memory usage, by closing as many activities or applications
as possible, or turning off the GUI for the duration of the yum command,

2.  adding temporary swap space, on an SD card or USB stick.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Home view activities layout

2010-07-29 Thread Gary Martin
On 30 Jul 2010, at 02:00, Chris Ball c...@laptop.org wrote:

 Hi,
 
 On Thu, Jul 29, 2010 at 03:57:35PM -0400, Walter Bender wrote:
 See http://en.flossmanuals.net/Sugar/ModifyingSugar (towards the
 bottom of the page).
 
 +1 on the spiral.
 
 I like it too.  I'm worried that it would scale badly, but Walter
 suggested just tightening the spiral, and that sounds good to me.
 
 Is anyone on the Design Team reading?

+1, have cc'ed Eben and Christian incase they miss this thread.

 What would it take to move
 forward with (a) including spiral, and (b) making it default?
 Should we ask for input from deployments, too?
 
 Also, how would people feel about a patch that:
  * allows drag and drop when in a non-freeform view
  * if an icon is moved while in a non-freeform view, the current
layout switches to freeform, and the position of all the
activities is saved as the base for the new freeform
configuration.

That sounds reasonable as well. The auto-mode change to freeform layout when 
dragging could be easily triggered accidentally when clicking, so that might 
want to only fire once an icon is dragged over a certain number of pixels. The 
visual change of the layout toolbar icon, as the switch happens, will provide 
help some additional visual feedback.

FWIW: Eben's original proposal (if I remember correctly) for dragging in the 
home view was to snap the icon to the nearest point on the fixed layout path 
and reflow the others to make space. Allowing organisation within the confines 
of the current layout. 

Regards,
--Gary

 (So, going to spiral, dragging one icon out of place would enable
 freeform -- overwriting any previous freeform configuration -- then
 going back to spiral using the layout menu would put all icons in
 their spiral place, then manually going back to freeform using the
 menu would restore you to spiral with the one activity you moved
 back in the place you moved it to.  Hope that made sense.)
 
 Thanks!
 
 - Chris.
 -- 
 Chris Ball   c...@laptop.org
 One Laptop Per Child
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] touchpad section for Sugar Control Panel

2010-07-29 Thread Walter Bender
On Thu, Jul 29, 2010 at 5:37 PM, Paul Fox p...@laptop.org wrote:
 walter wrote:
   On Thu, Jul 29, 2010 at 6:27 AM, pbrobin...@gmail.com
   pbrobin...@gmail.com wrote:
    On Wed, Jul 28, 2010 at 3:41 PM, Sascha Silbe
    sascha-ml-ui-sugar-de...@silbe.org wrote:
    Excerpts from Paul Fox's message of Wed Jul 28 16:01:22 +0200 2010:
    sascha wrote:
      Even your latest patch still contains code that is specific to OLPC
   builds and will break on other systems.
      Of course it's perfectly fine for you to say you only care about 
 OLPC
   builds for XO-1 (because the number of XO-1s running non-OLPC builds is
   minimal, especially if you don't count developers). But in that case your 
 patch
   should be included in the OLPC builds, not in Sugar mainline.
   
    can you remind me of the specific issue(s) here?
    I can remember two issues (there might be others as well):
    - hardcoded, absolute path (/home/olpc/whatever)
   
    I agree that it shouldn't ever user /home/olpc as hardcoded. At least
    you ~/.olpc-blah as it will then work on what ever distro and what
    ever user. I'm not sure of the general standard to use for this.
  
   How's this look?

 walter -- i didn't think of this when we were designing all of
 this:  how about if, in addition to this patch, you checked at sugar
 startup time and used the presence of that file in $HOME as an
 indication that you should set ptmode for the user?  then i could
 eliminate a chunk of the code from olpc-utils that sascha was
 complaining about.

 btw -- i just looked at your patch again -- what happens if
 NODE_PATH can't be opened for writing?  write_touchpad_mode()
 should fail gracefully in that case.  making the node writeable
 is the one line of code that will need to remain external to
 sugar, and we shouldn't assume that it has happened.  i'm
 referring to this:

    +def write_touchpad_mode(touchpad):
    +     Write the touchpad mode to the node path and set/unset the flag. 
 
    +    touchpad_mode_index = TOUCHPAD_MODES.index(touchpad)
    +
    +    node_file_handle = open(NODE_PATH, 'w')
    +    node_file_handle.write(str(touchpad_mode_index))
    +    node_file_handle.close()
    +
    +    if touchpad_mode_index == 0:
    +        if os.path.exists(FLAG_PATH):
    +            os.remove(FLAG_PATH)
    +    else:
    +        flag_file_handle = open(FLAG_PATH, 'w')
    +        flag_file_handle.close()

 paul


  
   35,36c35,36
    # FLAG_PATH is used to preserve status between boots.
    FLAG_PATH = '/home/olpc/.olpc-pentablet-mode'
   ---
    # FLAG_FILE is used to preserve status between boots.
    FLAG_FILE = '.olpc-pentablet-mode'
   123a124
        _flag_path = os.join(os.environ['HOME'], FLAG_FILE)
   125,126c126,127
            if os.path.exists(FLAG_PATH):
                os.remove(FLAG_PATH)
   ---
            if os.path.exists(_flag_path):
                os.remove(_flag_path)
   128c129
            flag_file_handle = open(FLAG_PATH, 'w')
   ---
            flag_file_handle = open(_flag_path, 'w')
  
   -walter
   
    Peter
    ___
    Sugar-devel mailing list
    Sugar-devel@lists.sugarlabs.org
    http://lists.sugarlabs.org/listinfo/sugar-devel
   
  
  
  
   --
   Walter Bender
   Sugar Labs
   http://www.sugarlabs.org
   ___
   Sugar-devel mailing list
   Sugar-devel@lists.sugarlabs.org
   http://lists.sugarlabs.org/listinfo/sugar-devel

 =-
  paul fox, p...@laptop.org


This do the trick?

35,36c35,36
 # FLAG_PATH is used to preserve status between boots.
 FLAG_PATH = '/home/olpc/.olpc-pentablet-mode'
---
 # FLAG_FILE is used to preserve status between boots.
 FLAG_FILE = '.olpc-pentablet-mode'
104a105,108
 _flag_path = os.join(os.environ['HOME'], FLAG_FILE)
 # if _flag_path exists, set the initial device value to stylus
 if os.path.exists(_flag_path):
 write_to_node_file(str(TOUCHPAD_MODES.index('stylus')))
120,122c124
 node_file_handle = open(NODE_PATH, 'w')
 node_file_handle.write(str(touchpad_mode_index))
 node_file_handle.close()
---
 write_to_node_file(str(touchpad_mode_index))
123a126
 _flag_path = os.join(os.environ['HOME'], FLAG_FILE)
125c128
 if os.path.exists(FLAG_PATH):
---
 if os.path.exists(_flag_path):
128c131
 flag_file_handle = open(FLAG_PATH, 'w')
---
 flag_file_handle = open(_flag_path, 'w')
129a133,143


 def write_to_node_file(value):
  Write to node path, catching exception is there is a problem 
 try:
 node_file_handle = open(NODE_PATH, 'w')
 except IOError, e:
 print e
 return
 node_file_handle.write(value)
 node_file_handle.close()

-walter
-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Audacity under Sugar

2010-07-29 Thread Sean Linton
Not sure about this:

bash-3.2# yum localinstall --nogpgcheck
http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
Setting up Local Package Process
Cannot open file:
http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm.
Skipping.
Cannot open file:
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm.
Skipping.
Nothing to do

Thanks for the pointer on switching off the GUI terminal.





On 30/07/2010, James Cameron qu...@laptop.org wrote:
 On Fri, Jul 30, 2010 at 12:19:59PM +1100, Sean Linton wrote:
 Any joy on the libmp3lame.so resolution?

 I'm curious.  Have you tried http://www.rpmfusion.org/Configuration for
 Fedora 11?

 Running Transaction
   Installing : compat-expat1 [1/1]
 error: Couldn't fork %post: Cannot allocate memory

 Installed: compat-expat1.i386 0:1.95.8-4
 Complete!

 You were lucky to get that install completed.  There was such a shortage
 of memory that a post-installation script could not be started.  Either
 it retried or continued regardless.

 You can reduce the chances of this happening by:

 1.  reducing memory usage, by closing as many activities or applications
 as possible, or turning off the GUI for the duration of the yum command,

 2.  adding temporary swap space, on an SD card or USB stick.

 --
 James Cameron
 http://quozl.linux.org.au/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Design] Home view activities layout

2010-07-29 Thread Frederick Grose
On Thu, Jul 29, 2010 at 9:00 PM, Chris Ball c...@laptop.org wrote:

 Hi,

On Thu, Jul 29, 2010 at 03:57:35PM -0400, Walter Bender wrote:
See http://en.flossmanuals.net/Sugar/ModifyingSugar (towards the
bottom of the page).

+1 on the spiral.

 I like it too.  I'm worried that it would scale badly, but Walter
 suggested just tightening the spiral, and that sounds good to me.

 Is anyone on the Design Team reading?  What would it take to move
 forward with (a) including spiral, and (b) making it default?
 Should we ask for input from deployments, too?

 Also, how would people feel about a patch that:
  * allows drag and drop when in a non-freeform view
  * if an icon is moved while in a non-freeform view, the current
layout switches to freeform, and the position of all the
activities is saved as the base for the new freeform
configuration.

 (So, going to spiral, dragging one icon out of place would enable
 freeform -- overwriting any previous freeform configuration -- then
 going back to spiral using the layout menu would put all icons in
 their spiral place, then manually going back to freeform using the
 menu would restore you to spiral with the one activity you moved
 back in the place you moved it to.  Hope that made sense.)

 Thanks!

 - Chris.


+1 for adding the Spiral pattern as an additional Favorite Home view.

Since the Home Ring is somewhat of a stylemark for Sugar, I suggest that the
Ring pattern be default until the number of Favorites selected exceeds a
threshold number (to be determined).

The top, or 00-hh, position is currently used for newly-added Activity
bundles and for the position of an Activity or bundle icon that was moved in
the preceding Freeform pattern (with the other icons pushed clockwise).

The newly-added Activity bundle icons should probably fill from the center
of a Spiral pattern to highlight the new tool.

As Gary mentioned, there should be a change-free perimeter around an icon to
avoid un-intentional pattern changes. I would suggest a distance of at least
1/2 the diameter of the icon on any of the fixed patterns and the minimum
grid dimension for the Freeform pattern.

The icon snap and reflow reordering directly on a patterned view sounds more
discoverable and usable for those intending to reorder a fixed pattern.  For
those intending to customize the pattern based on one of the fixed patterns,
the fixed-Freeform shift would be more usable.  To accommodate both
intentions, the snap  reflow method could be called if the icon center were
dropped on top of another icon.

It would be nice if http://bugs.sugarlabs.org/ticket/535 to include a 'View
Source' subpalette item on the Home view Frame icon could be worked in to
provide Learners easy access to the source for their amazing learning
companion.

Thanks for all the new features!

  --Fred
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] touchpad section for Sugar Control Panel

2010-07-29 Thread Paul Fox
walter wrote:
  On Thu, Jul 29, 2010 at 5:37 PM, Paul Fox p...@laptop.org wrote:
   walter wrote:
 On Thu, Jul 29, 2010 at 6:27 AM, pbrobin...@gmail.com
 pbrobin...@gmail.com wrote:
  On Wed, Jul 28, 2010 at 3:41 PM, Sascha Silbe
  sascha-ml-ui-sugar-de...@silbe.org wrote:
  Excerpts from Paul Fox's message of Wed Jul 28 16:01:22 +0200 2010:
  sascha wrote:
Even your latest patch still contains code that is specific to 
   OLPC
 builds and will break on other systems.
Of course it's perfectly fine for you to say you only care about 
  OLPC
 builds for XO-1 (because the number of XO-1s running non-OLPC builds is
 minimal, especially if you don't count developers). But in that case 
   your 
  patch
 should be included in the OLPC builds, not in Sugar mainline.
 
  can you remind me of the specific issue(s) here?
  I can remember two issues (there might be others as well):
  - hardcoded, absolute path (/home/olpc/whatever)
 
  I agree that it shouldn't ever user /home/olpc as hardcoded. At least
  you ~/.olpc-blah as it will then work on what ever distro and what
  ever user. I'm not sure of the general standard to use for this.

 How's this look?
  
   walter -- i didn't think of this when we were designing all of
   this:  how about if, in addition to this patch, you checked at sugar
   startup time and used the presence of that file in $HOME as an
   indication that you should set ptmode for the user?  then i could
   eliminate a chunk of the code from olpc-utils that sascha was
   complaining about.
  
   btw -- i just looked at your patch again -- what happens if
   NODE_PATH can't be opened for writing?  write_touchpad_mode()
   should fail gracefully in that case.  making the node writeable
   is the one line of code that will need to remain external to
   sugar, and we shouldn't assume that it has happened.  i'm
   referring to this:
  
  +def write_touchpad_mode(touchpad):
  + Write the touchpad mode to the node path and set/unset the 
   flag. 
  
  +touchpad_mode_index = TOUCHPAD_MODES.index(touchpad)
  +
  +node_file_handle = open(NODE_PATH, 'w')
  +node_file_handle.write(str(touchpad_mode_index))
  +node_file_handle.close()
  +
  +if touchpad_mode_index == 0:
  +if os.path.exists(FLAG_PATH):
  +os.remove(FLAG_PATH)
  +else:
  +flag_file_handle = open(FLAG_PATH, 'w')
  +flag_file_handle.close()
  
   paul
  
  

 35,36c35,36
  # FLAG_PATH is used to preserve status between boots.
  FLAG_PATH = '/home/olpc/.olpc-pentablet-mode'
 ---
  # FLAG_FILE is used to preserve status between boots.
  FLAG_FILE = '.olpc-pentablet-mode'
 123a124
  _flag_path = os.join(os.environ['HOME'], FLAG_FILE)
 125,126c126,127
  if os.path.exists(FLAG_PATH):
  os.remove(FLAG_PATH)
 ---
  if os.path.exists(_flag_path):
  os.remove(_flag_path)
 128c129
  flag_file_handle = open(FLAG_PATH, 'w')
 ---
  flag_file_handle = open(_flag_path, 'w')

 -walter
 
  Peter
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 



 --
 Walter Bender
 Sugar Labs
 http://www.sugarlabs.org
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel
  
   =-
paul fox, p...@laptop.org
  
  
  This do the trick?

it might.  it's really hard to tell without the -u option to
patch.  line number patches are so last century.  ;-)

paul

  
  35,36c35,36
   # FLAG_PATH is used to preserve status between boots.
   FLAG_PATH = '/home/olpc/.olpc-pentablet-mode'
  ---
   # FLAG_FILE is used to preserve status between boots.
   FLAG_FILE = '.olpc-pentablet-mode'
  104a105,108
   _flag_path = os.join(os.environ['HOME'], FLAG_FILE)
   # if _flag_path exists, set the initial device value to stylus
   if os.path.exists(_flag_path):
   write_to_node_file(str(TOUCHPAD_MODES.index('stylus')))
  120,122c124
   node_file_handle = open(NODE_PATH, 'w')
   node_file_handle.write(str(touchpad_mode_index))
   node_file_handle.close()
  ---
   write_to_node_file(str(touchpad_mode_index))
  123a126
   _flag_path = os.join(os.environ['HOME'], FLAG_FILE)
  125c128
   if os.path.exists(FLAG_PATH):
  ---
   if os.path.exists(_flag_path):
  128c131
   flag_file_handle = open(FLAG_PATH, 'w')
  ---
   flag_file_handle = open(_flag_path, 'w')
  129a133,143
  
  
   def write_to_node_file(value):
Write to node path, catching exception 

[Sugar-devel] [ASLO] Release Calculate-32

2010-07-29 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4076

Sugar Platform:
0.82 - 0.88

Download Now:
http://activities.sugarlabs.org/downloads/file/27003/calculate-32.xo

Release notes:
- New feature to display integer results in decimal, binary, octal, hexadecimal
- True and False supported as boolean constants
- Updated deg/rad, and sci/eng toolbar buttons to more clearly show the options 
and current state
- Fixed minus sign as first character in input so it no longer inserts the 
previous result
- Improved display of some calculations that provide an exact result
- Updated help strings
- Added missing strings to pootle ready for translation


Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [DESIGN] Problem with Pippy layout on =0.84

2010-07-29 Thread Anish Mangal
Pippy-36 [1] while running on xo1-0.84 (and lower) has a problem with
its layout [2] where the Keep and Activity-Stop buttons drop off the
main toolbar and the share combo box doesn't appear anymore (probably
due to lack of space on the main toolbar).

I wanted to get an opinion on what should be the best way around this.
When I detect an old version, should I create a new 'Actions' toolbar
with the the run, stop (different from Activity-stop) and clear
buttons[3], or revert to the original Pippy layout, wherein they were
displayed between the gtksourceview and the virtual terminal emulator
widgets.

[1] http://activities.sugarlabs.org/en-US/sugar/addons/versions/4041#version-36
[2] http://dev.laptop.org/ticket/9181#comment:11
[3] http://people.sugarlabs.org/~anish/Pippy-37-new.xo
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel