Re: [Sugar-devel] Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Michael Stone
Martin Langhoff wrote:
> > On Tue, Jun 30, 2009 at 7:25 PM, Bert Freudenberg 
> > wrote:
> > What's your use case?
> 
> In the normal course of operation, the XOs will work with the XS over
> wireless, getting their individual leases. This is a fallback "rescue"
> leases.sig .

Here's a gentle suggestion on how to more quickly (but narrowly) implement this
use case: 

   why not use Pippy to write a minimal activity that downloads the leases.sig
   file [e.g. with urllib2, wget, or curl], tests for mounted USB sticks,
   prompts the user if they're missing, and that copies the leases.sig file to
   the USB stick?

I think this might be a good way to go because 

   * it'll be faster than figuring out how to solve file management,

   * it doesn't depend on anyone else making changes, and

   * it may be of some educational value to people who want to understand how
 the system actually works and how they might automate it for themselves. 

Regards,

Michael
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Samuel Klein
On Tue, Jun 30, 2009 at 2:18 PM, Martin
Langhoff wrote:
> On Tue, Jun 30, 2009 at 7:20 PM, Simon Schampijer wrote:
>> Actually I came along this myself the other day. I would propose to have the
>> file name as the entry title and the 'downloaded from' description in the
>> journal entry description field.
>
> +1!

+1
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Martin Langhoff
On Tue, Jun 30, 2009 at 7:20 PM, Simon Schampijer wrote:
> Actually I came along this myself the other day. I would propose to have the
> file name as the entry title and the 'downloaded from' description in the
> journal entry description field.

+1!

cheers,



martin
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Journal and filenames on USB disks - more leases.sig problems

2009-06-30 Thread Martin Langhoff
On Tue, Jun 30, 2009 at 7:41 PM, Martin
Langhoff wrote:
> Rename and copy

>From the department of useful tricks...

If you want to preserve your users' ability to name a file you serve
via HTTP, eschew proper mimetypes and say with me:

Content-Type: application/x-forcedownload

With that mimetype, the "rename and copy" strategy works.

> Is there a better way to do this?

At first blush it doesn't qualify as 'better', but this particular
file is not meant to be read or edited by the end user (as it's
Canonical JSON). So serving it text/plain was a liability, as the
Journal would happily open it under Write.xo . So yes, we are better
off with it.

Maybe application/json-don't-edit-me would be more appropriate.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Martin Langhoff
On Tue, Jun 30, 2009 at 7:52 PM, Dave Bauer wrote:
> What would the file manager be for? Who is downloading this file,

A teacher. Probably less technical than the kids.

> how often
> and what do they need to do with it? It is easy enough to download it from
> the Terminal for a technical user.

The technical users are on this list. Not in the field.

What could you do with a file browser?

 - Put files on a USB stick to share them with others?
 - Browse a complex or large USB stick with files from my friends?

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Journal and filenames on USB disks - more leases.sig problems

2009-06-30 Thread Martin Langhoff
On Tue, Jun 30, 2009 at 7:47 PM, John Gilmore wrote:
> Don't use Browse as if it was a real web browser.  Don't use the
> Journal as if it was a real file system.

... and don't use Sugar as a useful Desktop or UI...?

I don't buy the argument. There are lots of things that rely on
filenames; as the userbase of Sugar grows, users will use Sugar for an
ever widening variety of tasks.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Dave Bauer
On Tue, Jun 30, 2009 at 1:46 PM, Martin Langhoff
wrote:

> On Tue, Jun 30, 2009 at 7:25 PM, Bert Freudenberg
> wrote:
> > What's your use case?
>
> Does "leases.sig" give you a hint? :-)
>
> The XS can now handle antitheft services. One of the things I added is
> the ability to generate a leases.sig with short-lived leases for all
> the (non-stolen) machines in the school.
>
> In the normal course of operation, the XOs will work with the XS over
> wireless, getting their individual leases. This is a fallback "rescue"
> leases.sig .
>
> As you can see in my other email, the problem is compounded with the
> Journal messing up rename :-/
>
> We need a file manager IMHO.
>

What would the file manager be for? Who is downloading this file, how often
and what do they need to do with it? It is easy enough to download it from
the Terminal for a technical user.

Dave

>
>
>
>
> martin
> --
>  martin.langh...@gmail.com
>  mar...@laptop.org -- School Server Architect
>  - ask interesting questions
>  - don't get distracted with shiny stuff  - working code first
>  - http://wiki.laptop.org/go/User:Martinlanghoff
> ___
> Sugar-devel mailing list
> sugar-de...@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>



-- 
Dave Bauer
d...@solutiongrove.com
http://www.solutiongrove.com
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Martin Langhoff
On Tue, Jun 30, 2009 at 7:25 PM, Bert Freudenberg wrote:
> What's your use case?

Does "leases.sig" give you a hint? :-)

The XS can now handle antitheft services. One of the things I added is
the ability to generate a leases.sig with short-lived leases for all
the (non-stolen) machines in the school.

In the normal course of operation, the XOs will work with the XS over
wireless, getting their individual leases. This is a fallback "rescue"
leases.sig .

As you can see in my other email, the problem is compounded with the
Journal messing up rename :-/

We need a file manager IMHO.




martin
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Journal and filenames on USB disks - more leases.sig problems

2009-06-30 Thread John Gilmore
> Is there a better way to do this?

Don't use Browse as if it was a real web browser.  Don't use the
Journal as if it was a real file system.

Run Firefox, not Browse.
Open up a terminal and do what needs doing.

You've just stumbled on one tiny corner of the problem that the Sugar
tools don't teach kids about real hierarchical file systems, and don't
provide access to real hierarchical file systems.  So kids don't get
access to source code (for reading or writing) because they can't grok
the structure in which it's stored.  Nor access to anything else, like
lease signature files.

John
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Journal and filenames on USB disks - more leases.sig problems

2009-06-30 Thread Martin Langhoff
I am trying to get leases.sig from the XS to the USB stick. On 8.2.x,
Browse.xo saves the file as

   File leases.sig from http://...

... two possible ways to move next.

Copy and rename

 1 - Insert (fat-formatted) USB stick, once mounted copy the file to
the USB stick. Check on Terminal indicates that the file has the LFN
we expect ("File leases.sig from http://...";).

 2 - Switch to the 'USB disk' view of the Journal.

 3 - Rename the file to leases.sig . A check from the commandline
shows that the file has not been renamed. Oops?. The Journal only
renames the metadata. Bug?

Rename and copy

 1 - Rename the file in the Journal to 'leases.sig'

 2 - Insert (fat-formatted) USB stick, once mounted copy the file to
the USB stick. The Journal reports that the file is called lease.sig.
>From terminal I can see that the file is called lease.sig.txt . Bug?

Is there a better way to do this?

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Bert Freudenberg

On 30.06.2009, at 19:20, Simon Schampijer wrote:

> On 06/30/2009 07:17 PM, Martin Langhoff wrote:
>> Using Browse.xo v101 on 8.2.x I cannot get Browse.xo to save a file
>> with the name that I am requesting.
>>
>> Browse.xo seems to take the name I hint from the server (from the URL
>> and using an 'content-disposition: attachment, filename="leases.sig"'
>> header). But it renames it as
>>
>>   "File leases.sig downloaded from http://.. "
>>
>> Filenames are often important. Even minor changes to a filename can
>> cause a lot of user grief.
>>
>> In general, OSs (from the kernel to the UI) try to keep the sanctity
>> of the filename as they do with the data. When they don't, all sorts
>> of trouble ensues. We wouldn't mangle the user's data. We shouldn't
>> mangle the filenames.
>>
>> Decorating the filenames with additional metadata is _cool_ otoh...
>>
>> cheers,
>>
>>
>>
>> m
>
> Actually I came along this myself the other day. I would propose to  
> have
> the file name as the entry title and the 'downloaded from' description
> in the journal entry description field.

While I would like this change it might make the Journal look more  
like a file manager which it isn't.

- Bert -


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Bert Freudenberg

On 30.06.2009, at 19:17, Martin Langhoff wrote:

> Using Browse.xo v101 on 8.2.x I cannot get Browse.xo to save a file
> with the name that I am requesting.
>
> Browse.xo seems to take the name I hint from the server (from the URL
> and using an 'content-disposition: attachment, filename="leases.sig"'
> header). But it renames it as
>
>  "File leases.sig downloaded from http://.. "


This is not the filename but the journal entry title. The actual  
filename is just a uuid.

That said, yes, the original filename should be preserved at least in  
the metadata (if the DS isn't actually rewritten to store files under  
their original name).

What's your use case?

- Bert -


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Simon Schampijer
On 06/30/2009 07:17 PM, Martin Langhoff wrote:
> Using Browse.xo v101 on 8.2.x I cannot get Browse.xo to save a file
> with the name that I am requesting.
>
> Browse.xo seems to take the name I hint from the server (from the URL
> and using an 'content-disposition: attachment, filename="leases.sig"'
> header). But it renames it as
>
>"File leases.sig downloaded from http://.. "
>
> Filenames are often important. Even minor changes to a filename can
> cause a lot of user grief.
>
> In general, OSs (from the kernel to the UI) try to keep the sanctity
> of the filename as they do with the data. When they don't, all sorts
> of trouble ensues. We wouldn't mangle the user's data. We shouldn't
> mangle the filenames.
>
> Decorating the filenames with additional metadata is _cool_ otoh...
>
> cheers,
>
>
>
> m

Actually I came along this myself the other day. I would propose to have 
the file name as the entry title and the 'downloaded from' description 
in the journal entry description field.

Regards,
Simon
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Browse.xo -- preserving a downloaded filename?

2009-06-30 Thread Martin Langhoff
Using Browse.xo v101 on 8.2.x I cannot get Browse.xo to save a file
with the name that I am requesting.

Browse.xo seems to take the name I hint from the server (from the URL
and using an 'content-disposition: attachment, filename="leases.sig"'
header). But it renames it as

  "File leases.sig downloaded from http://.. "

Filenames are often important. Even minor changes to a filename can
cause a lot of user grief.

In general, OSs (from the kernel to the UI) try to keep the sanctity
of the filename as they do with the data. When they don't, all sorts
of trouble ensues. We wouldn't mangle the user's data. We shouldn't
mangle the filenames.

Decorating the filenames with additional metadata is _cool_ otoh...

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Create and sign Country specific XO image

2009-06-30 Thread Daniel Drake
2009/6/30 Philipp Kocher :
> The XOs got manufactured some time ago and just not delivered because
> localization wasn't finished (localization is still not finished, but
> the XO arrived yesterday).
> So getting our own keys in the manufacturing data is not an option.

You can keyject them, if you have an appropriate relationship with
OLPC to get them to make you a keyjector firmware.

> I hoped for an easier image creation and signing process. What is the
> problem with the process described here
> http://blog.olenepal.org/index.php/archives/183?

Do your XOs have security enabled? If so you cannot do it because you
cannot reach a command prompt and the XO will not accept unsigned
images. Unless you want to modify the process to include obtaining
developer keys for all laptops and disabling security.

Also this method is a bad idea as has been discussed several times;
many files are generated during the first and subsequent boots which
are unique to each XO (hence you would want to delete them from your
image) but nobody has really documented which ones they are or how you
should deal with this. A number of projects have resorted to this
method but all of them seem to face oddities after a while...

Daniel
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Create and sign Country specific XO image

2009-06-30 Thread Martin Langhoff
On Tue, Jun 30, 2009 at 3:56 AM, Philipp Kocher wrote:
> So getting our own keys in the manufacturing data is not an option.

It still is. Google for keyjector :-)

> What is the
> problem with the process described here
> http://blog.olenepal.org/index.php/archives/183?

For a more complete explanation, see the 'multiple keys' page you will
find googling for keyjector. Some major points:

 - Forces you to depend on OLPC.
 - Forces OLPC to audit your image before signing it.
 - Your OLPC-signed image can be used on _any_ secure XO that uses
OLPC keys (instead of their own), not only the ones in your
deployment.
 - By using OLPC's keys in your deployment, your XOs can be re-flashed
with any other OLPC signed image.

cheers,


martin
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel