Re: [Sugar-devel] Status of printing support?

2010-03-28 Thread Vamsi Krishna Davuluri
Sorry about the long hiatus. I Had to go places for my
thesis; almost done with Engg. school.

Daniel, would be nice if you can update me with what
you've worked out on. I will be free full time, and will
definitely work on integrating it.

Regards,
Vamsi

On Fri, Mar 5, 2010 at 10:35 PM, Daniel Castelo dcast...@plan.ceibal.edu.uy
 wrote:

 I have spoken with the developers of the GoSC [1] Andres Ambrois and Vamsi
 Krishna Davuluri about this topic, some time ago I've spoken with Tomeu too.
 I have read the discussion about this topic on the list [2] and I am not
 sure if the community has a consensus about the solution.

 About GoSC, I have tested the Print activity and works fine.

 I've wrote a new wiki page about this feature, with the goal of separate
 the work done on GoSC and the feature that we want in Sugar [3].  A solution
 could be add an option to the journal to print some types of entries. Here
 in Uruguay the first goal is to bring the possibility of print using a local
 printer.

 I know that Vamsi wants to work on this feature, and obviously me too.


 Finally, sorry for the delay!

 [1]
 http://wiki.sugarlabs.org/go/Summer_of_Code/2009/Print_Support

 [2]
 http://lists.sugarlabs.org/archive/sugar-devel/2009-April/013921.html
 http://lists.sugarlabs.org/archive/sugar-devel/2009-May/014166.html

 [3]
 http://wiki.sugarlabs.org/go/Features/Print_Support


 On Sun, Feb 28, 2010 at 6:11 PM, Christoph Derndorfer 
 christoph.derndor...@gmail.com wrote:

 Hi all,

 since a teacher at the Austrian pilot project asked whether Sugar would
 support printing in the forseeable I was wondering what the current status
 in this area was?

 Last time I checked (back in August) the GSoC project hadn't evolved
 beyond a very early prototype that I personally couldn't get to run. Looking
 around the mailing list and the wiki I couldn't find any updated information
 so is it safe to assume that little to no progress has been made in that
 area? Or did I simply miss something?

 Also I remember Daniel from Plan Ceibal talking about the desire to make
 that happen based on demands from Uruguay.

 @Daniel, any news from South America when it comes to this?

 Thanks in advance,
 Christoph

 --
 Christoph Derndorfer
 co-editor, olpcnews
 url: www.olpcnews.com
 e-mail: christ...@olpcnews.com




 --
 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


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


Re: [Sugar-devel] Print Bundles up for testing.

2009-08-18 Thread Vamsi Krishna Davuluri
Yep, CUPS is mandatory. I will update the README with that in a while.


On Tue, Aug 18, 2009 at 3:16 PM, Christoph Derndorfer 
christoph.derndor...@gmail.com wrote:

 I assume I need to run yum install cups before starting with the steps as
 explained in your Readme, right?

 Thanks,
 Christoph

 On Tue, Aug 18, 2009 at 5:18 AM, Vamsi Krishna Davuluri 
 vamsi.davul...@gmail.com wrote:

 Oh and also adding to the install doc is:

 The deviceicon relies on the printscipt.py, so might want to make a copy
 of it in the respective directory along with the deviceicon.


 On Tue, Aug 18, 2009 at 4:54 AM, Vamsi Krishna Davuluri 
 vamsi.davul...@gmail.com wrote:

 The readme includes instructions on how to install,
 and the current bugs that are there.

 Besides those, sugar-emulator on fedora 11 experiences
 a delay of +1 min to load the activity. This is because of the
 enumerate printers loop.

 I am playing with the gtk+2.0-unix-print api lately, should
 come up with a solution soon.

 And please test the Sugar-Print-Moodle-Print XS integration,
 we never managed to test the code.

 Add a student to the site root module like this:
 System context: *Site Administration  Users  Permissions  Assign
 system roles* (this context is named site in Moodle 1.7)
 so you can test :)

 Oh and ReadMe's are incomplete.
 Also to adding to the moodle print module, it doesnt act as an activity.
 That is, you can't add instances of more than one , and every
 instance is added to the root module (site) itself.




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




 --
 Christoph Derndorfer
 co-editor, olpcnews
 url: www.olpcnews.com
 e-mail: christ...@olpcnews.com

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


Re: [Sugar-devel] Print Bundles up for testing.

2009-08-18 Thread Vamsi Krishna Davuluri
So while being on a bug search:

1) I forgot adding import gconf to printtoolbar.py
2) Right now adding print to any other course first other
than the site root, results in nothing being added.

Will post updated Modules in a short while.

But of course USB printing and device icon should work as
put up ;)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Sugar talk and Hackfest at IIT-M,India

2009-08-13 Thread Vamsi Krishna Davuluri
Hi,

I was invited by the organizers of Shaastra
http://www.shaastra.org/2009/site/events/coding/hackfest
to conduct a Sugar Hackfest. And have been given roughly
a day for the entire event.

The number of participants, statistically, has been overwhelming
in any event conducted at Shaastra.

But on a percentile of 100, our estimation is 40 will be python newbies
who don't know a thing about GTK or other APIs.
30 will be familiar with APIs and should be good enough with Python.
20 should be good enough with even GTK, and should be able to do
a lot. And 10 should be exceptional people.

But of course, there should be at least 1000 students there for this. ;)

Taking into account this scenario:

1) Provide some training material on their site.
2) Provide a hacking exercise on the site.
 More suggestions from you guys

Moving on to the program:

In the morning there will be a talk, which I will give:
I intend to give it roughly regarding these:

1) Sugar's motivation
2) Sugar's users
3) Future ( I will need some info regarding this)

The technical part:

1) How sugar works. (the technologies used)
2) A walk on where what happens. (where to hack, and what to hack)
3) How to build a simple activity

And for the actual Hack Fest:

Get a list of suggested bugs from the Sugar Community.
Divide them into levels.

And,
Get them to build a simple Game Activity. ( thanks to tomeu for the
suggestion).

 More suggestions welcome

And lastly, there are a few questions which I was never able to answer
properly,

Kids in the world are dying because of the lack of food and disease, how
are a bunch of
laptops and a Desktop going to save them? 

I personally answered it like this: We are trying to do what we can in the
education industry,
and by being open and free about it, we are also inviting everyone
interested in the cause to
join us. 

We already have desktops, how is sugar special

My answer: Sugar is aimed at a very younger audience, and a very light
machine. And besides,
we are very young; soon there will be a boom

Is there a better answer to these?

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


Re: [Sugar-devel] Sugar talk and Hackfest at IIT-M,India

2009-08-13 Thread Vamsi Krishna Davuluri
Thanks for replying!

Might be good to organize some of the less engineering focused
 participants to form language teams. We still need more localization
 work done in the local languages.


I understand. But can you please elaborate on the Language teams??



 Another way of saying the same thing is: Education is part of the
 solution to every problem facing the next generation. While we cannot
 solve problems for them, we can give them tools so that they can
 become a generation of problem solvers.


Right, I had something like this in the back of my head.


 (I'd leave the open and free argument as part of your answer to the
 next question.)

  We already have desktops, how is sugar special
 
  My answer: Sugar is aimed at a very younger audience, and a very light
  machine. And besides,
  we are very young; soon there will be a boom

 (1) Sugar is designed to meet the needs of young children learning--it
 puts an emphasis on guided discovery, collaboration, and reflection.
 It is not just a repackaging of an 1970s-inspired office desktop. (2)
 Sugar is built on free and open software because learning requires
 more than just access to knowledge--it also requires the ability to
 appropriate knowledge and put it to use. Sugar encourages and
 facilitates such appropriation through mechanisms such as view
 source. (3) Sugar is designed to run on small, old, slow machines,
 e.g., it can breath new life into existing in hardware.


This is very excellent! thanks!

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


Re: [Sugar-devel] [Moodle]About the has_capability() function

2009-08-12 Thread Vamsi Krishna Davuluri
Hi Martin,

We've done exactly as you've said.
I should release both Sugar Print And Moodle Print in a couple of
hours. There's an annoying bug about selecting page ranges
when generating a pdf/ or printing it that I'm trying to fix.
And I  realise I forgot adding a footer for log out to moodle
print.

I will also need someone who can test it on an XS, as I failed to
configure one.

Thanks,
Vamsi

On Tue, Aug 11, 2009 at 6:52 AM, Martin Langhoff
martin.langh...@gmail.comwrote:

 On Fri, Jul 31, 2009 at 1:33 AM, Vamsi Krishna
 Davulurivdavul...@acm.org wrote:
  Hi Martin,
  I am sold with the blocks concept ;)

 Hey! That's excelletn news! Sorry about the long latency.

  Though:
 
  I have finally wrapped things with the XML-RPC stuff for assignment-clone
  (which is print) module

 Good.

  My idea was do anything new only after having a backup. But there's
 still
  the authentication stuff

 Um. That's not going to be very satisfactory for end users. They don't
 know if it's backedup, they don't have direct control over the backup,
 and it happens only once a day.

  that's at question. How do i tell moodle this is from an user X and how
 do I

 You can include -- in the POST data -- the SN and UUID of the machine.
 See how Browse.xo is doing, and perhaps the recent changes by Hamilton
 Chua about ds-backup

  tell moodle that this will
  go into a particular course module ( I see no way to beat this without
  having  a selection UI in the
  client).

 Forget about it being in a course because Sugar has no such concept.
 It belongs to no course. The Moodle side should make it always about
 the 'sitecourse'.

 hth



 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

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


[Sugar-devel] [Sugar-GSoC] Print Support (Moodle or No Moodle)

2009-07-06 Thread Vamsi Krishna Davuluri
Hi,

So I had spent almost 3 weeks entirely with Moodle,
and I have failed to be half as productive with Moodle
as I have with sugar.

I would relate the reasons to be:

My lack of an estimation on moodle's vastness,

1) I had no experience with web oriented systems
2) I had no prior experience with php and databases
3) The assignment plugin which is a what I'm intending to
base my print Module is very huge (4000-5000 Lines of code)
It would take me a while to hack it and tune it down.
4) I still haven't hit the comfort spot with moodle
5) I can't figure out what does what exactly.

As a bear essential, I could get the assignment module to have
a print option, but I don't exactly have the code ready for it.(its
back at my home place)

Anyway, the alternatives I can lay out are:

1)Use a thin client-server based architecture, a small python based server
script
which listens to requests from sugar (XOs) and stores them in a folder, the
admin
can then print those files.
( suggestions on perfecting this are needed)

2) drop this, and focus on network printing.

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


[Sugar-devel] [server-devel] Setting up the XS

2009-07-03 Thread Vamsi Krishna Davuluri
Hi,

So as per Martin's suggestion. I'm making this mail.

I don't have a spare system at my disposal right now,
so I am running XS under a VM.
But I can't figure out how to access the moodle server
outside the VM. (virtual Box)
Other than that moodle is set up.

Thanks,

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


[Sugar-devel] PRINTING – The Interface and Engi neering Models

2009-06-24 Thread Vamsi Krishna Davuluri
 Tomeu suggested approach:

Which is an approach implementing the Printing Libraries provided

by the activity parents like Evince, Abiword and Mozilla.


 *Evince has a list of functions in C which I have been looking up,

but sadly enough they don't come as libraries, so its hack and extract

them before I can even get them to work as a Library.



*Abiword doesn't have wrappers readily visible either, and also I realise

i'm not upto the level of understanding C++ abiword code much,

because it makes my C++ skills look newbie


 *Browse, I have to look up again.


 But the advantages with this approach is:



   1.

   We wont have to insert any new code, we would just be getting a few
   wrappers, and calling them up
   2.

   We can provide a very efficient printing scenario.


 Disadvantages include:



   1.

   I can't fix the amount of time I'd be requiring to finish this up



 A more lenient but resource unfriendly approach(s)


 Case-1: Go with the original plan, that is the Printing activity.

Creating Print Icons in other activities that connect to Print activity
through tubes.

And export their docs to it, have it converted to PDF and use gtkunixprint.


 Advantages:

   1.

   I won't have to kill any of the things I have done so far.
   2.

   Should be very trivial to implement.


 Disadvantages:

   1.

   Not the best approach
   2.

   Could be resource unfriendly


 Case-2: Do the PDF conversion within the activities such as Read and Write

themselves for the pages selected. And connnect them to Print activity, and
print them.


 Advantages:

   1.

   Improvement of case-1, and It should be much more resource friendly
   especially when printing selected pages from a book

Disadvantages:

Has the same as case-1


 Silbe's Approach:

Implementing any of the before said cases, but not implementing tubes/events

for connecting to activities, just save to journal, and again open with
Print Activity.


 Advantages:

   1.

   kills connecting code
   2.

   should make an identical copy of the Printed document in the journal


 Disadvantages:

   1.

   Inherits the ones from the parent blueprint
   2.

   Some folks might disagree ;)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Sugar Print Queue and Device Icon

2009-06-23 Thread Vamsi Krishna Davuluri
oh also, i'm using this,
self._cancel.get_child().set_text ('Document:' + title + '\n' + status)
where self._cancel is the menu item.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Sugar Print Queue and Device Icon

2009-06-20 Thread Vamsi Krishna Davuluri
Hi,

I'm working on adding Print Support to Sugar. And
right now I'm working on creating a Printer Device Icon.

what i've managed to do so far looks like this:
http://i39.tinypic.com/35d6vlz.png

suggestion from Mel Chua was to remove the scroll bars
and limit the print jobs displayed.
Also, suggestion from silbe was to list only one print job
each completely and when clicked on the list display all
the print jobs in a window.

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


Re: [Sugar-devel] Sugar Print Queue and Device Icon

2009-06-20 Thread Vamsi Krishna Davuluri
Hi Gary,

Thanks for your interest in the project, I think your mockup design looks
like a better cake than mine. It doesn't needlessly complicate the
interface, and , the removal of the source printer seems like a better
design
as we already have the device mentioned up.
Plus, the all black theme matches up well with the other devices.

And scroll bars definitely look ugly.

If you have the time, please do put it up here:

http://wiki.sugarlabs.org/go/Print_Support

Thanks,
Vamsi
On Sun, Jun 21, 2009 at 12:12 AM, Gary C Martin g...@garycmartin.comwrote:

 Here's my shot at a mock-up, just bouncing ideas about. I've not been
 following the Print discussions in detail so apologies if I've dropped some
 important detail.

 My aim was to simplify as much as possible, print dialogues are confusing
 enough for adults :-) FWIW: I'm sure you've found it already, but there is a
 nice printer.svg device icon in sugar-artwork ready for use (I used it the
 mock-up below). I've assumed showing completed jobs is un-necessary, but I
 have mock-ups with that if needed as well (just imaging the (x) cancel
 button hiding and the Status text to Complete), not sure how many you'd
 want sitting in the list (just the last N?):









 Can generate more mock-ups if needed (will await further input from folks).

 Regards,
 --Gary

 P.S. Vamsi: Is there a SL wiki page for your printing project that mock-ups
 can go to in future (rather than me filling the mail-list)?




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


Re: [Sugar-devel] [Server-devel] Firing up ejabberd

2009-06-17 Thread Vamsi Krishna Davuluri
I hadn't done a checksum. But when mounting the image
through virtualbox, it works fine. But when I burn the
image, the disc wont even let me look at its contents
Its as good as a blank disc.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Query regarding settings.php in modules(moodle)

2009-06-16 Thread Vamsi Krishna Davuluri
Martin,

Hi, I'm in the process of building a print activity module,
and was wondering how settings.php works.
As in I looked into assignment/settings.php, and I couldn't
quite figure out how you use the set flags and settings in
the rest of the files.
I don't see a require_once(/mod/assignment/settings.php)
So I think somehow the environment variables for a course
are set, can you explain what's happening?

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


[Sugar-devel] [sugar-devel]engineering the moodle-print communication

2009-06-08 Thread Vamsi Krishna Davuluri
On Tue, Jun 9, 2009 at 2:04 AM, Dave Bauer dave.ba...@gmail.com wrote:


 http://wiki.laptop.org/go/XS_Installing_Software

 This is a complete linux installation so you'll need a seperate machine you
 can install onto or a virtual machine.

 Dave

 --
 Dave Bauer
 d...@solutiongrove.com
 http://www.solutiongrove.com


Thanks Dave.
I will start start working on it first thing in the morning.
It's 2:26 AM here!
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] The moodle-Print User Experience

2009-05-29 Thread Vamsi Krishna Davuluri
Also, I would like to know whether building this as a plugin to assignments
module would be better than creating an activity from the scrap.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] The moodle-Print User Experience

2009-05-28 Thread Vamsi Krishna Davuluri
Hi,


I was wondering about the best moodle user experience. The three procedures
I've sketched out are:
1) Follow the roots of the advanced assignment upload module, and let
printing be added by the teacher as an activity for a specific period.
Or
2) Make printing a default resource for every course once the course is
established
Or
3) Provide a printing option for every registered user, and provide him/her
with a printing option which also follows the roots of assignment upload,
   But very loosely. This will of course require a good deal of work
regarding permissions on which teacher can assess what.

Personally, I prefer 1.

Some teachers might not want the students to print in their courses, but
might want them to for a specific duration. - more or less completely
An art course might want printing for the entire duration though, so perhaps
an option when establishing the course to add the print module by default.

Or a (4) , which I am open for. My knowledge with moodle and its deployed
environment is very limited, so I would like some advice here.

Thanks

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


Re: [Sugar-devel] Quoting in shell scripts (was: Re: [sugar-devel] Recent fiddlings with Print Support)

2009-05-16 Thread Vamsi Krishna Davuluri
Hello! I finally figured what was going wrong with my script.


Jonas, I have tried implementing your suggestions. using mktemp, X, and
also a -m 077. The code doesnt work for some reason that way. lpr gets me a
failed job. Also that code is basically ported from this guide,
http://www.ibm.com/developerworks/linux/library/l-dvi-filter.html

Jonas, Silbe, notice this

[va...@localhost Desktop]$ $(abiword --to=ps /home/Vamsi/lololo.odt); if [
$? -ne 0 ];  then echo 'hello'; else echo  'what'; fi
hello

[va...@localhost Desktop]$ $(abiword --to=doc /home/Vamsi/lololo.odt); if [
$? -ne 0 ];  then echo 'hello'; else echo  'what'; fi
what

[va...@localhost Desktop]$ $(set -e abiword --to=doc
/home/Vamsi/lololo.odt); if [ $? -ne 0 ];  then echo 'hello'; else echo
'what'; fi
what

[va...@localhost Desktop]$ $(set -e abiword --to=ps /home/Vamsi/lololo.odt);
if [ $? -ne 0 ];  then echo 'hello'; else echo  'what'; fi
what

[va...@localhost Desktop]$ $(abiword --to=ps /home/Vamsi/lololo.odt); if [
$? -ne 0 ];  then echo 'hello'; else echo  'what'; fi
hello

[va...@localhost Desktop]$ $(abiword --to=ps /home/Vamsi/lololo.odt); if [
$? -ne 0 ];  then echo 'hello'; else echo  'what'; fi
hello

Set -e basically yields me the same case, that is even on an error it
returns me a 0. But without set -e , it works great.


Moving on,

Its like this,

The lp user of lp group ( cups script executor) messes up with permissions
when executing commands in a subshell, that's really messed up. my rationale
is, in a subshell the lp user has no longer domain. Also, CUPS doesnt write
to our /tmp folder, instead has its own folder defined somewhere.
So what I made is,

sandbox1=${TMPDIR1:-/tmp}/tempcups.
(umask 077  mkdir $sandbox1) || exit 1

I made another temp folder for the subshells to execute their commands


And, andres, it initially does try to convert to doc.


The algorithm is pretty much like this,

1) We try to write to some new path besides the same folder, if it works, we
are running 2.6.6 and plus, if not we are on 2.6.6--
- We cannot check for ~somepath.ps here as 2.6.8 doesnt have that
capability, so that would be inviting a hole as we would be skipping for
2.6.8 as well!

# $fn happens to be supplied variable
$(abiword --to=$sandbox1/temp123.doc $fn)

# if this doesnt work, do the following, as 2.6.6- could only do operations
in the same folder,
# we are copying ;)
if [ $? -ne 0 ];
then
#our dummy file
fn1=$sandbox/temp123.odt
cp $fn $fn1


# Call abiword quietly, securely
abiword --to=ps `echo $fn1 | sed -e 's/odt$/doc/' `
fn2=`echo $fn1 | sed -e 's/odt$/ps/' `


2) Now we enter the case what if we are in fact on 2.6.6+, well now come two
paths again, 1) are we 2.6.8, or 2) anything other than 2.6.8
   (again 2.6.8 cant write to ps directly, we need an intermediate doc
conversion for this effect)

# Call abiword quietly, securely
#check if our version doesn't require an intermediate conversion, if it
does, do it

$(abiword --to=$sandbox1/temp123.ps $fn)
if [ $? -ne 0 ];

then

abiword --to=$sandbox/temp123.doc $fn
abiword --to=$sandbox/temp123.ps $sandbox/temp123.doc

else

#abiword --to=$sandbox/temp123.ps $fn

fn2=$sandbox1/temp123.ps

Andres, script works great for ALLL cases :D



#!/bin/bash
# CUPS filter to process ODT files using abiword



# $6 happens to be the path to file passed as argument for debugging
purposes i am use $1
fn=$6

#for our subshell convenience
sandbox1=${TMPDIR1:-/tmp}/tempcups.
(umask 077  mkdir $sandbox1) || exit 1


# we are creating a dummy folder, which can take different file types.
sandbox=${TMPDIR:-/tmp}/t6cups-odftops.
(umask 077  mkdir $sandbox) || exit 1


#The condition which checks whether our abiword is 2.6.6+ or 2.6.6-

$(abiword --to=$sandbox1/temp123.doc $fn)

if [ $? -ne 0 ];
then

#our dummy file
fn1=$sandbox/temp123.odt
cp $fn $fn1

# Call abiword quietly, securely
abiword --to=ps `echo $fn1 | sed -e 's/odt$/doc/' `
fn2=`echo $fn1 | sed -e 's/odt$/ps/' `

else

# Call abiword quietly, securely
#check if our version doesn't require an intermediate conversion, if it
does, do it

$(abiword --to=$sandbox1/temp123.ps $fn)
if [ $? -ne 0 ];

then

abiword --to=$sandbox/temp123.doc $fn
abiword --to=$sandbox/temp123.ps $sandbox/temp123.doc

else

#abiword --to=$sandbox/temp123.ps $fn

fn2=$sandbox1/temp123.ps

fi

fi

cat $fn2

#remove the sandbox folder, for debugging purposes check by commenting the
following line and see what is in the /tmp/ folder
#rm -rf $sandbox
#rm -rf $sandbox1
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [sugar-devel] Recent fiddlings with Print Support

2009-05-13 Thread Vamsi Krishna Davuluri
Okay, so here's the latest dope.

Assertion: abiword 2.6.8 might be the best stable out there, but its a
nightmare for my project.
Reason: It requires an intermediate conversion, and the final pdf which is
achieved doesn't have text that can copy/pasted (bug)
Correction: Avoid 2.6.8 for the deployments

My new code is version independent anyway,

And if we can Avoid 2.6.8, we won't have to worry about text being drawn as
image artifacts; they will be drawn as text only.


This week's job, integrate this into fork() of read.


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


Re: [Sugar-devel] Quoting in shell scripts (was: Re: [sugar-devel] Recent fiddlings with Print Support)

2009-05-13 Thread Vamsi Krishna Davuluri
Thanks. I have taken into account your suggestions and made another script.

This had been not a competition to beautify or verify the rigidity of the
script, rather to see if opensuse accepted it. Which it still doesnt
Something to do with lp user file create permissions.
Though the script works fine on ubuntu and fedora.
And also, this is my first shell script


#!/bin/bash -e
# CUPS filter to process ODT files using abiword


# $6 happens to be the path to file passed as argument
fn=$6

#in case its not defined
TMPDIR=/tmp

# we are creating a dummy folder, which can take different file types using
mkdir, change to =/tmp/cups-odftops
sandbox=${TMPDIR-/tmp}/cups-odftops.
(umask 077  mkdir $sandbox) || exit 1

#our two dummy files
fn1=$sandbox/temp123.odt
cp $fn $fn1

# Call abiword quietly, securely
abiword --to=ps $fn1
fn2=`echo $fn1 | sed -e 's/odt/ps/' `

#check if our version doesn't require an intermediate conversion, if it
does, do it, else break;

if [ -n `grep -q %!PS-Adobe-3.0  $fn2 ` ];then
abiword --to=doc $fn1
abiword --to=ps `echo $fn1 | sed -e 's/odt/doc/' `
fi

cat $fn2
#remove the sandbox folder, for debugging purposes check by commenting the
following line and see what is in the /tmp/ folder
#rm -rf $sandbox
#NOTES: CURSE me for not realizing that these scripts cant write to anyplace
other than tmp dirs, and wasting about 20 hrs doing all sorts of
combinations of selinux tweaking, writing sample scripts (which magically
did the job) and CHMODing


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


[Sugar-devel] The User experience/interface for Printing

2009-05-03 Thread Vamsi Krishna Davuluri
hello,

So, talking to Tomeu, we agreed that for Write and Read using the gtkprint
would be best as both support it as a printing API.

Now, the current plan is:
1) We do journal printing only, albeit, the respective activity opens the
file.

Now here a cross road is presented:

1) Do we use a print dialog inside each activity that can save it as pdf,
print or export a pdf to moodle

2) Do we use separate buttons for each of these operations?

What of the user experience?

The initial plan was to make Read the global printing station, how do you
find this idea?
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] The User experience/interface for Printing

2009-05-03 Thread Vamsi Krishna Davuluri
The usecases would be as following:

The user, John, creates a document and saves it to his journal one fine day.
The next day john transfers that journal item to his friend's XO the next
day.
His friend, Kennedy, has his XO set up in a moodle environment.  Kennedy
when in school decides to send that file (which is an ODF ) to the teacher
for review and get it printed there. Kennedy then double clicks on the item,
which results in Write opening the file, and selects the print button in the
print toolbar, a dialog pops up (which is understandably similar to gtkprint
dialog), he selects the print destination as moodle, and selects no of pages
as 'all', after sending. (ofcourse there is an internal conversion to PDF
happening, which gtkprint is doing) the teacher checks his print page in
moodle, views the file (either through fancy javascript or a download) and
approves/disapproves for printing. Kennedy then logs into his moodle print
page and checks if the job was success or not, and if he has a comment from
his teacher. But we already know John's doc was excellent. Kennedy goes to
collect the printed document, which he hands over to John the evening.

Use cases to note:
1) transferred docs can be printed
2) A nice graphical dialog that takes care of it all
3) exports only PDFs to moodle
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] The User experience/interface for Printing

2009-05-03 Thread Vamsi Krishna Davuluri
== Use cases ==

1.- John has written an essay in Write about sharks and would like to print
it right now on a printer plugged via USB to his computer.
John does this by hitting the print button in write, and selecting 'usb
printing' as destination in the dialog which pops up. He then selects print
in the dialog. John also leaves the default number of pages as 'all' while
he does this.

2.- John\'s teacher asks the class to deliver their essays in PDF format.
John and his friends open their respective files with the default mime type
activity, hit the print button, and select 'export to moodle' as
destination. The option of course is visible only if John and his friends
aren't using all three of their slots.

3.- John\'s teacher liked his essay and would like to have it printed and
exposed in the classroom. The only available printer in the school is
attached to the school server.
The teacher hits approve in the moodle teacher page over john's assignment.
It is sent for printing, and John recieves back an acknowledgement in his
user page


== Non-functional requirements ==

Printing resources can be very expensive for most schools, so the system
should include a way for students to submit jobs to a queue and for an
administrator to preview and approve or denie them.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Print support blog

2009-04-26 Thread Vamsi Krishna Davuluri
aa, here's the blog, suggestions?
And I will add you as one of the authors, if you can give me your account.

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


[Sugar-devel] Fwd: Print Support (journal vs activity)

2009-04-22 Thread Vamsi Krishna Davuluri
Yep, agreed, though for some reason if the user has a file other than that
specified format, and wants to print it badly (say a file which he just
transferred from his pendrive), in-activity printing would never work, and
even having a missing odf filter would be inviting a loophole. So my idea is
I will create a filter for every default format and include it (which is
only odf) (we wont have even one additional filter, and as we wont be
requiring PPD files for either wifi printing or pdf conversion through
cups-pdf we would be reducing the installation size greatly) that taken care
of,

here's a brief outlline of journal printing,
we create a new button, for previewing purposes open it with read, for print
purposes link to a printing activity (building a print activity is final
step) end gsoc. apart from moodle this is the skeleton I think is best.
instead of trying to write print code for each new activity why not just see
to it that we follow a norm of filters?
*
OR TWO! *, we avoid all this complicated stuff, we make read our printing
dock, any file sent to journal will be opened by read when we want  to print
it or preview it and for all the objects this will do pdf drawing for moodle
and create a journal item as pdf too, and for direct printing use gtkprint.

Please, try to agree to one of these, both are technically journal printing,
both send pdf to moodle.


On Wed, Apr 22, 2009 at 12:05 AM, Andrés Ambrois andresambr...@gmail.comwrote:

 On Tuesday 21 April 2009 14:16:36 Tomeu Vizoso wrote:
  On Tue, Apr 21, 2009 at 19:02, Carol Farlow Lerche c...@msbit.com
 wrote:
   It's entirely unclear what this project has morphed to.  Tomeu, what
 use
   is uploading arbitrary journal entries to Moodle?
 
  Because the chances that the needed filter to convert that file to a
  printable format is in the server are bigger than being in every
  machine, for some deployments.
 
   I thought creating pdf
   output in sugar and enabling uploading of the pdf to Moodle was the
 point
   of this project. That is useful in two ways.  First, it is a path to
   assignment turn-in or printing either through Moodle or by other
   transports to a system configured to print pdfs.  It also allows a
   student to review the printer-ready output to decide if it is worth
   getting hard copy.
 
  Sure, I though I had made clear than printing to PDF in Sugar has
  important use cases.
 
  Regards,
 
  Tomeu


 My idea for dealing with the headache of filters is assuming only pdf/ps is
 printable, and having the Journal display a Print button if and only if
 the mimetype is pdf or ps.


 This way we can then make the decision of sending it to moodle via xml-rpc,
 a local cups queue, or a remote cups server using lpr.


 Activities that can't output to pdf/ps will be provided with gtkprint
 facilities and a pdf journal entry will be generated after they draw their
 output.


 Vamsi has already hacked pdf output into Write, so that's one big activity
 we will have covered.


 For the security issues, activities will only generate a journal pdf entry,
 which would be displayed using show_object_in_journal or somesuch (just like
 Chat currently handles opnening URLs). The user will then have the ability
 to immediately review the printable output and/or send it to the preferred
 queue.


 This architecture follows some basic principles:


 1) Paper/Ink is expensive, we need a way to easily and reliably review
 what's going to be printed. Requiring people to load up Browse, navigate
 inside Moodle, and download a PDF file for review, is not exactly
 user-friendly.


 2) We don't need to specify a set of required filters...yet, we can
 easily expand this to well, HTML, JPG and PNG are probably going to be
 supported by every CUPS out there, so admit those as well, but I think 1)
 is priority here.


 3) Following up on 2), the journal mechanism is orthogonal to what we end
 up sending to Moodle. Ben and Tomeu have sort of agreed on sending the raw
 journal entries to Moodle, so we can use all the CUPS filters on the server,
 this conflicts with 1) in my view, but it has its advantages.


   On Tue, Apr 21, 2009 at 9:36 AM, Tomeu Vizoso to...@sugarlabs.org
 wrote:
   On Tue, Apr 21, 2009 at 18:29, Benjamin M. Schwartz
  
   bmsch...@fas.harvard.edu wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
   
Tomeu Vizoso wrote:
Printing is not limited to uploading files to moodle, we provide
 both
local and server printing and users will use whatever works in
 their
environment.
   
I think this is too much for one Summer of Code project.  That's why
 I
have been recommending that we forget about local printing for now.
  
   I would actually be happy if we just implemented sending journal
   entries to the print queue and the moodle module. Print to pdf has
   several important use cases and I would like to see it implemented for
   0.86 for at least Write and Browse, but I don't think it needs to be
   

Re: [Sugar-devel] Fwd: Print Support (journal vs activity)

2009-04-22 Thread Vamsi Krishna Davuluri
   [21:52] bemasc iwikiwi: Read only handles pdf, and nothing else.  You
still need all the conversion filters.

 [21:54] bemasc (Read actually can handle a few things other than pdf, but
 not jpg, png, odt, txt, html...)
 [21:55] bemasc iwikiwi: now, if you want, you could write a Print
 activity that can handle all these types.  Presumably, that means including
 conversion filters inside the Print activity
 [21:55] iwikiwi bemasc, yep, just checked the documentation, and I want
 that particular case implemented, that is transfer a file from pendrive,
 then get it printed, so either I make all file export capable activities
 print or I just make a cups-pdf printing activity.
 [21:55] iwikiwi bemasc:  exactly my thoughts :D
 [21:56] CIA-56 Sugar: sayamindu sucrose-0.84 * r091d2ead5ef3 /po/es.po:
 Commit from Sugar Labs: Translation System by user sayamindu. 18 of 18
 messages translated (0 fuzzy).
 [21:56] bemasc iwikiwi: This Print activity could actually be built
 into Read, or it could be its own new Activity.
 [21:57] bemasc That's something you will have to decide.
 [21:57] iwikiwi bemasc: building it into read seems reasonable, but I
 wonder if I can add odf viewing to read... if i can everything is solved
 [21:58] bemasc iwikiwi: of course you can.  Just convert to pdf and open
 with evince.
 [21:59] -- kristianpaul has left this server (Read error: 110 (Connection
 timed out)).
 [21:59] iwikiwi bemasc: okay, so thats internal again, done. this way
 journal wont have to be disected much.
 [22:00] bemasc I like this idea.  The cool thing about Read is the
 interface, which is designed to be usable (on the XO) in tablet mode.
 [22:00] bemasc If you do it this way, then as an additional benefit, Read
 will gain the ability to view all these different formats.
 [22:01] iwikiwi bemasc: okay, so when ever we open files in read, we do
 this, cups-pdf internally makes a temp object which read displays, and when
 we exit read, the object is destroyed, mean while within read it can be made
 a journal item, or sent to moodle or direct printing
 [22:02] iwikiwi very nice!
 [22:02] bemasc That sounds good to me.
 [22:02] bemasc I'm not sure if you even need cups-pdf, but it might be
 the easiest way.
 [22:03] iwikiwi hmm, what is the harder way you have in mind?
 [22:03] bemasc I mean, you want Read to be able to open a .odt file.
 [22:03] bemasc To do that, the .odt has to be converted to pdf, using
 libabiword.
 [22:04] CIA-56 Sugar: sayamindu sucrose-0.84 * rfcd966df0030 /po/es.po:
 Commit from Sugar Labs: Translation System by user sayamindu. 18 of 18
 messages translated (0 fuzzy).
 [22:04] Nubae tomeu: my ip seems to be blacklisted and I cant commit to
 git, alsroot suggested I ssh proxy via your server
 [22:04] iwikiwi bemasc: actually this is easier, as i wont be needing to
 write a new filter
 [22:04] bemasc So you have two options: you can add a odt filter to cups,
 and then use cups-pdf.
 [22:04] tomeu heh
 [22:04] bemasc Or you can write your own code to say it's an odt, so
 I'll use libabiword to convert it.
 [22:04] tomeu Nubae: don't have an account in shell.sl.o?
 [22:05] Nubae nope
 [22:05] bemasc iwikiwi: I don't know which way is easier.
 [22:05] tomeu Nubae: you should!
 [22:05] tomeu bernie: happen to be around?
 [22:05] alsroot tomeu: last time i blacklisted shell.sl.o :) -- but it
 could be resolved now
 [22:05] CIA-56 Sugar: sayamindu sucrose-0.84 * r5cf22accff75 /po/es.po:
 Commit from Sugar Labs: Translation System by user sayamindu. 18 of 18
 messages translated (0 fuzzy).
 [22:05] tomeu alsroot: the blacklist is not per host and per key?
 [22:06] tomeu hmm
 [22:06] Nubae heh, yeah, it hasnt been needed till now
 [22:06] tomeu no, may be per host
 [22:06] Nubae I've deleted my key several times and recreated
 [22:06] alsroot tomeu: it it per IP-key then its ok
 [22:06] Nubae without luck
 [22:06] tomeu Nubae: can you comment in the ticket already open about it?
 [22:06] tomeu this is really a pita
 [22:06] Nubae yep
 [22:06] iwikiwi bemasc: I take 2nd, but I think I will leave this one bit
 till 6th, so i can actually play with the abiword framework code :p
 [22:07] iwikiwi i have endsem exams running atm


 pretty much sums it up, its either use pyabiword or cups-pdf for internal
 conversion :D

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


[Sugar-devel] Print Support (journal vs activity)

2009-04-21 Thread Vamsi Krishna Davuluri
[quoting tomeu]
Hi all,

my apologies for entering in this discussion so late, the soas and
distributions deadlines played very badly with the gsoc schedule.

If I understood correctly, the plan proposed in Vamsi's application
implies that the conversion from the format in which activities write
to a printable format like pdf would happen in the journal, I suppose
through the use of cups and a set of filters. Is this right?

I would like to know how we can expect that Sugar will be deployed
with all the filters that the user will need as she installs more
activities. Also would like to know if it has been considered to use
instead the same approach that regular linux apps use.

Thanks,
[/quote]

[quote=me]Tomeu ( from his sugar maintainer perspective) has expressed a
potential disaster in the part-1 of my proposal, that is by using CUPS-Pdf
we would be actually required a great load of filters which would be a
nightmare for the maintainers. And also the issue to register each mime type
with every install of a new activity, for which we would have to wait till a
new sugar update.

As an alternative he suggested I use gtkprint (for which again I have
written a script and shown to tomeu),

So anyway gtkprint makes use of a structure which is rendered to cairo
objects and thus prints the screen as a pdf or prints to a printer ( a
wrapper around cups) but the advantage is we dont utilisie that many filters
again
( the implementation can be found in pyabiword )

But this would mean we do printing to device, and printing to pdf within
activity only.

For the moodle part, when in the print page, for the upload slots we limit
it such that it can only upload pdfs

OR
what I had been thinking is, make py xmlrpc communicate with moodle's
datastore, have a 'print to moodle' within the activity itself, and upload a
maximum of three parallel live requests..
if 3 reached, disable the option
The status updates of print requests and such can again be found in the
moodle's print's user's page.
The rest will be same as my proposal.
[/quote]

So talking to my mentor and silbe, I think I have sketched it like this,

essentially each activity will be checked if it can print to pdf/ps or not,
if not code in activity.py draws a cairo object (pdf) and makes an entry of
it in journal.
after which simple cups code can be written to print that pdf or send to
moodle from journal.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Gsoc] Congratulations to the accepted Gsoc applications.

2009-04-20 Thread Vamsi Krishna Davuluri
I am really surprised with the list, although still absolutely what I had
predicted. And I am glad to be working with Lucian, bemasc and silbe as
fellow GSoC people, awesome people them. (I dont know felipe, but his
profile was really awesome) And aa is one awesome coding/knowledgeable
magician! ;)
I am sure we have at least one more awesome condidate ready to do her
project off GSoC, I hope others take it as an example. :D



On Tue, Apr 21, 2009 at 5:52 AM, Jameson Quinn jameson.qu...@gmail.comwrote:


 On Mon, Apr 20, 2009 at 5:48 PM, Rafael Enrique Ortiz Guerrero 
 dir...@gmail.com wrote:

 Student Title Mentor Status
 Lucian Branescu 
 Mihailahttp://socghop.appspot.com/student_project/show/google/gsoc2009/sugarlabs/t124025001233
 Webified
 walter bender
 accepted

 Sascha 
 Silbehttp://socghop.appspot.com/student_project/show/google/gsoc2009/sugarlabs/t124025001821
 Version support for Sugar data store / Journal
 Jameson Quinn
 accepted

 felipe lopez 
 toledohttp://socghop.appspot.com/student_project/show/google/gsoc2009/sugarlabs/t124025002631
 Karma + Activities
 bryan berry
 accepted

 vamsi krishna 
 davulurihttp://socghop.appspot.com/student_project/show/google/gsoc2009/sugarlabs/t124025003408
 Adding Print Support to the XOs
 andres ambrois
 accepted

 Benjamin 
 Schwartzhttp://socghop.appspot.com/student_project/show/google/gsoc2009/sugarlabs/t124025004103
 Decentralized Asynchronous Collision-free Editing with Groupthink
 assim deodia
 accepted


 These were some of the best applications both for Sugar and SugarLabs
 community development



 Rafael Ortiz


 These were, indeed, justly accepted. But I have to take a minute to thank
 the applicants who were not accepted. There were at least 5 or 6 unaccepted
 applications which showed serious dedication, creativity, and practicality.
 The competition to get into GSoC is always very tough, and this year was no
 exception. I have reason to hope that a few of the better applicants are
 still interested in contributing to Sugar Labs, and I hope to see them
 participating through the year, and then winning slots next year. (And since
 I'm pretty darn sure we can do a great job with the applicants who were
 accepted, I hope that Google will reward us with more slots next year).

 Thanks, all the applicants, and thank you to Google as well. This is a
 great program from all sides, and it's humbling to be a part of it.

 Jameson


 ___
 GSoC mailing list
 g...@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/gsoc


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


[Sugar-devel] A bot activity for sugar

2009-04-14 Thread Vamsi Krishna Davuluri
Hello,

So I have been working on an IRC bot for a while, and an idea had occurred,
what if we have a graphical bot with a few limited animations for now, make
it an activity, and feed it with help and documentation on every other
activity and itself ofcourse. In the future a language dictionary and such
can be embedded into this bot.
The bot's graphical features can be coded with pygtk(for the widget frame,
text input), some pyglet/pygame for animations
http://pyglet.org

This will be most entertaining/ fun for any kid. As I remember my own
experiences with such bots from a particular os. Kids love interaction,
graphical interaction is by far the fastest way to plant knowledge about
anything.

Give me your opinions on this, maybe this will be something I will work on
for sugar in the near future ;)

Thank you

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


Re: [Sugar-devel] A bot activity for sugar

2009-04-14 Thread Vamsi Krishna Davuluri
Lucian, that would be awesome. Maybe we can dev this as a combination. If we
get in and get through this, post GSoC at sugar is going to be amazing fun.
The idea kinda stemmed off while I've been developing a bot for irc in
python, I was trying to make a female pair for xobot.

On Tue, Apr 14, 2009 at 7:32 PM, Lucian Branescu lucian.brane...@gmail.com
 wrote:

 I've been wanting to give pyglet a try for some time. Maybe I can help?

  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] adding printing support to the journal

2009-04-14 Thread Vamsi Krishna Davuluri
Tomeu,
Your last argument was very strong.[00:10] tomeu iwikiwi: it's ok for gtk
print to depend on cups, the important part is that we don't depend on
filters being present so printing can happen
 the overhead involved is high with cups-pdf... Is it difficult to even get
the default filters installed? as every activity even new one will support
one default filter or another. But yes, with gtkprint we would only have to
worry about a single filter for conversion, and another for pdf-to-printing.
I have anyway asked the gnome people about the validity just in case. (on
their mailing lists) If I dont get any reply though, I will alter my
proposal. Its not a heavy modification to it anyway. Just the conversion to
pdf part. :D

Thanks!



But I still dont understand

On Tue, Apr 14, 2009 at 11:06 PM, Tomeu Vizoso to...@sugarlabs.org wrote:

 Hi all,

 my apologies for entering in this discussion so late, the soas and
 distributions deadlines played very badly with the gsoc schedule.

 If I understood correctly, the plan proposed in Vamsi's application
 implies that the conversion from the format in which activities write
 to a printable format like pdf would happen in the journal, I suppose
 through the use of cups and a set of filters. Is this right?

 I would like to know how we can expect that Sugar will be deployed
 with all the filters that the user will need as she installs more
 activities. Also would like to know if it has been considered to use
 instead the same approach that regular linux apps use.

 Thanks,

 Tomeu

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


Re: [Sugar-devel] Where does Browse store downloads?

2009-04-13 Thread Vamsi Krishna Davuluri
hello,

 Have you checked your system's /tmp/ folder? Sugar tends to rename them to
funny names, so your best bet is to go through all of the tar.gz s there, or
go to a site like tinypic.com and select that file for upload from the
datastore. Oh wait that would work only if tar.bz are displayed there ;)

Hope that helps!

On Mon, Apr 13, 2009 at 7:06 PM, Bastien bastiengue...@googlemail.comwrote:

 The subject says it all: where does Browse store downloads?

 I have downloaded a .tar.gz file.  I can't seem to find it.
 I've looked through .mozilla/* and .sugar/data/* but didn't
 find anything useful.

 Hint?

 PS: http://wiki.laptop.org/go/Browse#Downloads is corrupted.

 --
  Bastien
 ___
 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] Where does Browse store downloads?

2009-04-13 Thread Vamsi Krishna Davuluri
Just checked the prefix of those files is also something like tmp[a-z] etc
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] relating bug #610 and design

2009-04-02 Thread Vamsi Krishna Davuluri
Hello,

So I was wondering, after right clicking on a journal item, the palette
again shows the file name. Why is that? as on most of the standard operating
systems, when ever we right click on an item, we are given options such as
open, open with, print, copy etc. Never the file name.

Couldn't the alternate be to highlight the clicked item instead.


Also a fix to bug #610 would be

def __init__(self, label=None, accel_path=None,
menu_after_content=False,
 text_maxlen=0, **kwargs):

screen = gtk.gdk.Screen()
self.wwidth = screen.get_width()

#window = gtk.Window()
#self.wwidth, self.wheight = window.get_size()

self.max_pixels = int((1.0/4)*(self.wwidth))


if text_maxlen = 0:
self._label.set_max_width_chars(text_maxlen)
self._label.set_ellipsize(pango.ELLIPSIZE_MIDDLE)

labels_box.pack_start(self._label, expand=True)

self._secondary_label = gtk.Label()
self._secondary_label.set_alignment(0, 0.5)

if text_maxlen = 0:
self._secondary_label.set_max_width_chars(text_maxlen)
self._secondary_label.set_ellipsize(pango.ELLIPSIZE_END)





-

 def do_size_request(self, requisition):
gtk.Window.do_size_request(self, requisition)

# gtk.AccelLabel request doesn't include the accelerator.
#label_width = self._label_alignment.size_request()[0] + \
  #self._label.get_accel_width() + \
  #2 * self.get_border_width()
label_width= self.max_pixels

requisition.width = max(requisition.width,
style.GRID_CELL_SIZE * 2,
label_width,
self._full_request[0])





What this does is, It draws the screen proportional to the max_pixels
specified(the ratio can be fine tuned by the design team), and ellipsizes
which ever exceeds that limit.



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


[Sugar-devel] print support proposal up and running!(uses moodle)

2009-03-25 Thread Vamsi Krishna Davuluri
Hello!

So, here is an almost finished version of my Print Proposal minus the second
community member remarks. ( cc Martin Langhoff please give me your views on
this if possible)

http://wiki.sugarlabs.org/go/Print_Support

Please file in your questions or views under the discussion tab in the page.
Or the Mailing lists is as good of a place too!

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


Re: [Sugar-devel] [Server-devel] Fwd: Regarding adding a moodle plugin

2009-03-25 Thread Vamsi Krishna Davuluri
That would be a killer addon! I could just use libxmlrpc and write an
activity which sends the pdfs to the php data warehouse server side, also
prompt for the user's login.
But wouldn't it be really the same thing as logging in from the moodle's
plugin page, and sending those files? I guess it kills one layer of tasks,
taking your suggestion I can directly queue them for printing. :D without
again manually uploading them. And resend the status to the journal.



On Wed, Mar 25, 2009 at 3:51 PM, Martin Langhoff
martin.langh...@gmail.comwrote:

 2009/3/24 Vamsi Krishna Davuluri vamsi.davul...@gmail.com:
  Much appreciated!
  I have updated my proposal, that actually makes the process much easier.
  http://wiki.sugarlabs.org/go/Print_Support

 Also -- if your print queue is based on the Journal, we can add a
 simple xml-rpc point of entry to Moodle to receive the PDFs, and teach
 the Journal to talk to it directly.

 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

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


Re: [Sugar-devel] print support proposal up and running!(uses moodle)

2009-03-25 Thread Vamsi Krishna Davuluri
- new Activities may include with the m the ability to turn their own
document files into a PDF, so at activity-install time, you may want
to poke the activity metadata to extend the list of mimetypes handled.



 - cups has lots of overhead and complication, if you find a simpler
way to print to PDF, it will be a big win

I have a fix for Write which exports to pdf, but to implement the lib
abiword api in each and every activity is really a pain - more for the
activity authors.
Luke was kind enough to check an installation of complete cups on the XO. It
took a space of 18 mb including cache space, so an installation of cups-pdf
alone (which is 1.3 mb installation space along with dependencies will be
around 8 mb)will do.

What cups-pdf does is it has the ability to print a pdf from any mime type
associated with cups mime.types. As opposed to what the abiword api does
(draw the screen to graphic objects and export to pdf) . So this is really
an asset!





Of course, the activities would definitely have to have their  mime types
associated in some .info file, I will just look it up.

On Wed, Mar 25, 2009 at 3:49 PM, Martin Langhoff
martin.langh...@gmail.comwrote:

 2009/3/25 Vamsi Krishna Davuluri vamsi.davul...@gmail.com:
  So, here is an almost finished version of my Print Proposal minus the
 second
  community member remarks. ( cc Martin Langhoff please give me your views
 on
  this if possible)
 
  http://wiki.sugarlabs.org/go/Print_Support

 Looks good! A couple of notes...

 On the XO side,

  -
  - cups has lots of overhead and complication, if you find a simpler
 way to print to PDF, it will be a big win

  - once you have a Journal-based PDF print queue, it will be easy to
 push that into moodle or into other systems. I really like that.

 On the XS side:

  - Moodle + cups makes lots of sense.

  - Happy to help design the moodle integration and user workflow.

  - Good call on the quotas and teacher control.


 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

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


Re: [Sugar-devel] [Server-devel] Fwd: Regarding adding a moodle plugin

2009-03-25 Thread Vamsi Krishna Davuluri
Agreed, I thought the same thing, but in my excitement I couldn't put it out
coherently. :P

The activity actually makes the transfer simple for the kids.

And I see your point for the alternative (no XO case), I will implement it !

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


Re: [Sugar-devel] [Server-devel] Fwd: Regarding adding a moodle plugin

2009-03-25 Thread Vamsi Krishna Davuluri
Yep, I will! In fact will be on it now.
Thanks, btw while replying back here, do I add your email id to To or just
send to sugar-devel?


On Wed, Mar 25, 2009 at 5:11 PM, Martin Langhoff
martin.langh...@gmail.comwrote:

 2009/3/25 Vamsi Krishna Davuluri vamsi.davul...@gmail.com:
  And I see your point for the alternative (no XO case), I will implement
 it !

 Cool. Still makes sense to build it within moodle (those other users
 need to have a moodle account for many other things anyway...)

 Sounds like the plan is taking shape -- you'll add this new info to
 the wikipage? ;-)

 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

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


Re: [Sugar-devel] [Server-devel] Fwd: Regarding adding a moodle plugin

2009-03-25 Thread Vamsi Krishna Davuluri
Thank you Martin! :D
I have edited my wiki page to reflect them!

On Wed, Mar 25, 2009 at 5:35 PM, Martin Langhoff
martin.langh...@gmail.comwrote:

 On Wed, Mar 25, 2009 at 12:56 PM, Vamsi Krishna Davuluri
 vamsi.davul...@gmail.com wrote:
  Yep, I will! In fact will be on it now.
  Thanks, btw while replying back here, do I add your email id to To or
 just
  send to sugar-devel?

 Up to you. I am on sugar-devel. If you send it to me as well as to
 sugar-devel, my MUA shows that it is addressed specifically to me, so
 there is a higher chance I will reply to it :-)

 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

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


[Sugar-devel] Here is my wiki page for Print Support

2009-03-23 Thread Vamsi Krishna Davuluri
http://wiki.sugarlabs.org/go/Category:2009_GSoC_applications/Print_Support

As you can see I suck at presentation, I would be glad if someone can help
me fix it up to look a bit more clean. :P
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Print Support proposal Final(input please)

2009-03-21 Thread Vamsi Krishna Davuluri
UPDATE: The entire CUPS daemon with dependencies takes 18 mb installation
space(including cache rpms) on the XO laptops, so if a only cups-client and
dependencies is installed it should take less space.
(info credit : Luke, who was kind enough to check this on his XO)

I will need suggestions, if this is feasible, or do I go with approach 1
only.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Print Support proposal Final(input please)

2009-03-20 Thread Vamsi Krishna Davuluri
I have come up with two approaches:
I will be concise this time. And try to talk less on sugarizing it.

Thanks to tomeu and silbe, and a little fiddling around, it is now clear
that rendering to pdf is in no way dependent on CUPS, it can be done with
the cairo libs, and gtk print.
And even documents are drawn as text and not images, so they are subject to
copy/paste.

So now come the approaches:

1) Implement print-to-pdf, transfer the file to the server in a normal
tcp/ip protocol, and never interact with CUPS client side, the transferred
file with open in a default viewer or a one after the other in a queue
(FIFO) format. which can then be saved/printed/ deleted accordingly.

The logic for printing to pdf with with cairo is fairly simple ( I have the
code ready) . Now what is left is sugarizing them, The journal will be the
printing hub, i will write a small activity that takes care of printing to
pdf/ or sending a locally temporary pdf to server.


2) Install minimal cups-client packages on the laptops side. now we can
directly interact with the cups print server through gtk print in the
program, in the process avoiding writing code for file
transfer. The rest will be very much the same. This will send a print
request to the IPP queue of the server.
   There will be no use for print-to-pdf this way, but it can made available
too. (please be ready to dish out a maximum of 20-25 mb disk space this way
for the minimum cups installation)

Please dont worry that there hasnt been enough eloboration on sugarizing it,
I will include  it in the proposal on the wiki page after this has been
taken care of. :)

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


Re: [Sugar-devel] Print Support proposal Final(input please)

2009-03-20 Thread Vamsi Krishna Davuluri
send*
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Print Support proposal (need input) Beta

2009-03-19 Thread Vamsi Krishna Davuluri
Carol, thanks for replying! Much appreciated!

So in a classroom environment, can I assume the classroom server will be
acting as the server?
The thing is I never got proper input on what I branded obscure. Yes, I
agree, if its a classroom environment I'll definitely add permission access
and queuing management.

Permissions I'd grant as follow:

Only the requester and the print server owner can remove the requesters job
from the queue, otherwise there is no way to stop the job.
Implementation to check match IP address should do the trick, a read in the
configuration file, and the originating signal.


On Thu, Mar 19, 2009 at 10:00 PM, Carol Farlow Lerche c...@msbit.comwrote:

 Print queue management and quotas are key to this feature being usable in a
 classroom/school environment.  Consumables are very expensive and kids love
 to hit print, often without thinking.  So providing a way to place print
 jobs in a hold for review status is very important, IMHO, as well as
 providing a way to look through the queue releasing only the jobs you really
 want to print.

 2009/3/19 Vamsi Krishna Davuluri vamsi.davul...@gmail.com


 Hello!

 So here is a refined and less abstract approach for the Print Idea. (input
 credit Luke, Ben, Tomeu)

 Initial problem:

  where do we get the cups daemon/server from, and how do we have it
 working on python since its written in c?
 solution:
  The cups daemon would only need to be running on the core distro (add it
 as a dependency), and we have the amazing pycups bindings which wrap it up,
 so we can use in our configuration program and other apis which we will
 discuss.

 Now, that we have CUPS ready, lets step into implementing it

 problem 2: Interacting with the CUPS daemon to actually configure the
 printer

 solution:

 Debian has a python version of print-system-configure UI, hacking into the
 code will yield a decent template for fedora. Which can then be tailored to
 fit the sugar guidelines.


 problem 3: Who does the actual printing of the files?!

 solution:

 well, again there's these amazing pygtk print modules that take care of
 it. They make the CUPS API a backend, and work as a decent printing API,
 they again access the print-system-configure UI(or diving more deeply, the
 files postscript files (PPD) ) ( I have written a sample printing program
 demonstrating it on fedora)



 NOW LETS SUGARIZE THEM! (oh sweet sugar)

 problem4: We have everything ready but where do we put our
 print-system-conifguration?

 solution: we strip the debian (python based) UI, and dress it up with our
 nice sparkling UIs (the sugar design apis ) and put it in the control panel
   Here's where I propose an extra credit : Make the
 configuration An Interactive Wizard, (someone add groovy animations later
 on, or its on the end list on me) , as we will have
   to provide a default printer configuration at least once,
 despite cups having the ability to automatically select the printer.

 problem5: Okay, okay most of the job is done. Now where do we print from?

 answer:
 We print from that one place ofcourse, The Journal! (after all its he
 uncrowned king bad joke)

As it is it is against the bitfrost system for a program to both access
 the network and the journal at the same time - secuirty constrictions. and
 also as to see that activity writers dont have to struggle with the print
 code, we can just see that the print requests are rendered into nice pdfs
 (CUPS again, we can print to pdfs) with the click of a magical button,store
 them at a known location and send those 'hit coordinates' and if any
 metadata by the IPC, and queue them up on journal for print. As an ACK send
 back a notification to the activity stating, You have a print job waiting,
 print it with default settings? or go to journal to edit settings Remember
 how i said pygtk can interact with the CUPS settings, well we will implement
 the relatively important ones in the journal as an option.

 Extra credit: I've been thinking about this make the school server take in
 network print requests (feasible/required or not? input please)

 Obscure stuff: CUPS server, Quota management, and permissions,

 CUPS server is a background process (hence daemon) which loopsback over
 the listening ports and ips.
 CUPS already benefits from a standard print quota management, the secrets
 of the implementation are in our debian configuration UI.
 permissions: ( I need input here) print permissions should be of any
 matter only if its a network assignment as far as i know.



 So what's the end result::

 A nice interactive printer configuration wizard!
 Minimal work for the activity author! (an addition of 3 modules to print
 to pdf, but it will be of great value, as the user can present his work in
 as a pdf within the activity)
 Journal acting as print dock!
 pdf printing!
 And everything sugarized

 P.S. My actual application will be formal, please dont kill me :P

 Input Input Input please

Re: [Sugar-devel] Print Support proposal (need input) Beta

2009-03-19 Thread Vamsi Krishna Davuluri
class room/school server as the print server*

On Thu, Mar 19, 2009 at 10:11 PM, Vamsi Krishna Davuluri 
vamsi.davul...@gmail.com wrote:

 Carol, thanks for replying! Much appreciated!

 So in a classroom environment, can I assume the classroom server will be
 acting as the server?
 The thing is I never got proper input on what I branded obscure. Yes, I
 agree, if its a classroom environment I'll definitely add permission access
 and queuing management.

 Permissions I'd grant as follow:

 Only the requester and the print server owner can remove the requesters job
 from the queue, otherwise there is no way to stop the job.
 Implementation to check match IP address should do the trick, a read in the
 configuration file, and the originating signal.



 On Thu, Mar 19, 2009 at 10:00 PM, Carol Farlow Lerche c...@msbit.comwrote:

 Print queue management and quotas are key to this feature being usable in
 a classroom/school environment.  Consumables are very expensive and kids
 love to hit print, often without thinking.  So providing a way to place
 print jobs in a hold for review status is very important, IMHO, as well as
 providing a way to look through the queue releasing only the jobs you really
 want to print.

 2009/3/19 Vamsi Krishna Davuluri vamsi.davul...@gmail.com


 Hello!

 So here is a refined and less abstract approach for the Print Idea.
 (input credit Luke, Ben, Tomeu)

 Initial problem:

  where do we get the cups daemon/server from, and how do we have it
 working on python since its written in c?
 solution:
  The cups daemon would only need to be running on the core distro (add it
 as a dependency), and we have the amazing pycups bindings which wrap it up,
 so we can use in our configuration program and other apis which we will
 discuss.

 Now, that we have CUPS ready, lets step into implementing it

 problem 2: Interacting with the CUPS daemon to actually configure the
 printer

 solution:

 Debian has a python version of print-system-configure UI, hacking into
 the code will yield a decent template for fedora. Which can then be tailored
 to fit the sugar guidelines.


 problem 3: Who does the actual printing of the files?!

 solution:

 well, again there's these amazing pygtk print modules that take care of
 it. They make the CUPS API a backend, and work as a decent printing API,
 they again access the print-system-configure UI(or diving more deeply, the
 files postscript files (PPD) ) ( I have written a sample printing program
 demonstrating it on fedora)



 NOW LETS SUGARIZE THEM! (oh sweet sugar)

 problem4: We have everything ready but where do we put our
 print-system-conifguration?

 solution: we strip the debian (python based) UI, and dress it up with our
 nice sparkling UIs (the sugar design apis ) and put it in the control panel
   Here's where I propose an extra credit : Make the
 configuration An Interactive Wizard, (someone add groovy animations later
 on, or its on the end list on me) , as we will have
   to provide a default printer configuration at least once,
 despite cups having the ability to automatically select the printer.

 problem5: Okay, okay most of the job is done. Now where do we print from?


 answer:
 We print from that one place ofcourse, The Journal! (after all its he
 uncrowned king bad joke)

As it is it is against the bitfrost system for a program to both
 access the network and the journal at the same time - secuirty
 constrictions. and also as to see that activity writers dont have to
 struggle with the print code, we can just see that the print requests are
 rendered into nice pdfs (CUPS again, we can print to pdfs) with the click of
 a magical button,store them at a known location and send those 'hit
 coordinates' and if any metadata by the IPC, and queue them up on journal
 for print. As an ACK send back a notification to the activity stating, You
 have a print job waiting, print it with default settings? or go to journal
 to edit settings Remember how i said pygtk can interact with the CUPS
 settings, well we will implement the relatively important ones in the
 journal as an option.

 Extra credit: I've been thinking about this make the school server take
 in network print requests (feasible/required or not? input please)

 Obscure stuff: CUPS server, Quota management, and permissions,

 CUPS server is a background process (hence daemon) which loopsback over
 the listening ports and ips.
 CUPS already benefits from a standard print quota management, the secrets
 of the implementation are in our debian configuration UI.
 permissions: ( I need input here) print permissions should be of any
 matter only if its a network assignment as far as i know.



 So what's the end result::

 A nice interactive printer configuration wizard!
 Minimal work for the activity author! (an addition of 3 modules to print
 to pdf, but it will be of great value, as the user can present his work in
 as a pdf within the activity)
 Journal acting

Re: [Sugar-devel] Print Support proposal (need input) Beta

2009-03-19 Thread Vamsi Krishna Davuluri
I see your point, I agree. I will do the elimination as is required, and
this time include a milestones/deadlines in my hopefully final draft
proposal.
My main objective will be to send the file from the laptop through the
network to the server, have the necessary code for it both sides.(and
ofcourse write UIs). (I'm actually having good experience with client-server
projects)

But if I should finish this earlier than the GSoC time span, and have
sufficient time I will work on print-to-pdf, or since I intend to become a
contributor, I will  focus on it as an interest. I'd very well like to see
myself implement this, so I will do this!


So Ben, do I write print-to-pdf in my proposal or not?  and if I do, what
would be the best way to do it?




On Fri, Mar 20, 2009 at 12:05 AM, Benjamin M. Schwartz




 Yes.  There are lots of potential use cases that you might support, but
 you will not be able to support them all.  I am suggesting that you
 approach this as a critical path problem.  Do the absolute minimum
 amount of work necessary to achieve useful functionality in some
 situations, and then grow it from there.


 I agree the ability to convert things to PDF would be nice to have.  I
 even proposed it as a feature of the Journal in June:
 http://lists.sugarlabs.org/archive/sugar-devel/2008-June/006598.html

 What I am saying here is: conversion to PDF within Sugar is not on the
 critical path to working print support.



 Well, that's fine.  I just want to warn you against putting too many
 things into one Summer of Code proposal.  Remember: most Summer of Code
 projects fail, because the project is too big and the code never reaches
 sufficient quality to be merged into the main codebase.

 - --Ben
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.9 (GNU/Linux)

 iEYEARECAAYFAknCkFoACgkQUJT6e6HFtqQQEACcCmit2diezRw7Jsa3KW9UVuGo
 /msAniY1boOs/7GaXuDBnoZdjQ+7QKGQ
 =4kja
 -END PGP SIGNATURE-

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


Re: [Sugar-devel] Print Support proposal (need input) Beta

2009-03-19 Thread Vamsi Krishna Davuluri
I was researching that, just extracting the print-pdf modules along with its
dependencies and creating a new make (or package) should do the trick, but
my knowledge limits me from seeing an implementation for it.

On Fri, Mar 20, 2009 at 5:05 AM, Wade Brainerd wad...@gmail.com wrote:

 2009/3/19 Luke Faraone l...@faraone.cc:
  2009/3/19 Caroline Meeks carol...@meekshome.com
 
  Another use case is the student wants to print from home.  The work may
  have been done at school then the student comes home, either using SoaS
 or
  with a laptop and now wants to print on the parent's computer.
 
  For that use case, we're going to have to have some sort of
  install-as-needed service. Is there a way to do so that will be easilly
  discoverable? (I'm at a loss as to how that can be accomplished without
  requiring technical knowledge on the part of the user, or distro-specific
  fixes)

 Possibly stupid question, but why is CUPS that big?  Does it have
 dependencies we could work on stripping?

 USB-based printing would be great IMO.  Particularly when we're
 talking about kids with laptops other than the XO, in developed
 countries where printers at work and at home are more common.

 -Wade

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


Re: [Sugar-devel] Fwd: Regarding the print support idea(GSoC)

2009-03-18 Thread Vamsi Krishna Davuluri
And are the implementations not prone to modification?
As in we could specify a particular #print_port to bypass them?

On Wed, Mar 18, 2009 at 6:58 PM, Vamsi Krishna Davuluri 
vamsi.davul...@gmail.com wrote:


 The link you gave didn't work, so I checked this page
 http://wiki.laptop.org/go/OLPC_Bitfrost
 I have gone through security models listed, umm ... was there anything
 specific I was to look into?



 On Wed, Mar 18, 2009 at 6:42 PM, Luke Faraone l...@faraone.cc wrote:

 2009/3/18 Vamsi Krishna Davuluri vamsi.davul...@gmail.com

 I'd grant them only if the user is the owner of that specific document or
 is master root. This will be most useful in case the machine acts as a cups
 server and a request comes from the network, we could see that other than
 the local master, no one else on the network has access to that particular
 job, or stop that printing event from taking place.

 btw thought of another thing, when the print button is clicked in an
 activity, the request metadata (object) is sent to the journal, but the
 journal doesnt have to immediately take over control, instead  within the
 activity a pop up comes which says 'print jobs in queue('this can be closed,
 or clicked to go to the journal where the job can be canceled, or started)
 and when loging in into sugar, if pending jobs are there again a
 notification is displayed, and if a print job is of a particular activity,
 and they are pending, and if the same activity is opened again it
 notification is displayed.


 You might want to review the OLPC project (and therefore sugar's) security
 model: http://dev.laptop.org/git?p=security;a=blob;f=bitfrost.txt



 --
 Luke Faraone
 http://luke.faraone.cc



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


Re: [Sugar-devel] Fwd: Regarding the print support idea(GSoC)

2009-03-18 Thread Vamsi Krishna Davuluri
True enough, but I hadn't been talking about printing from activities
directly at all for the last half of the mails. :
But for even CUPS to act as a server and accept incoming requests, it would
have to excercise freedom to one port atleast, but write a bit of a code so
that it accepts requests only from local network which ever was configured
on the router. ;) And, we could specify certain pool of ips which are to
access the print server.

On Wed, Mar 18, 2009 at 7:06 PM, Luke Faraone l...@faraone.cc wrote:



  On Wed, Mar 18, 2009 at 9:28 AM, Vamsi Krishna Davuluri 
 vamsi.davul...@gmail.com wrote:


 The link you gave didn't work, so I checked this page
 http://wiki.laptop.org/go/OLPC_Bitfrost
 I have gone through security models listed, umm ... was there anything
 specific I was to look into?

   Well,


  I'd grant them only if the user is the owner of that specific
 document or is master root. This will be most useful in case the machine
 acts as a cups server and a request comes from the network, we could see
 that other than the local master, no one else on the network has access to
 that particular job, or stop that printing event from taking place.


 As far as I am aware, this is the default CUPS behavior.

   btw thought of another thing, when the print button is clicked in an
 activity, the request metadata (object) is sent to the journal, but the
 journal doesnt have to immediately take over control, instead  within the
 activity a pop up comes which says 'print jobs in queue('this can be 
 closed,
 or clicked to go to the journal where the job can be canceled, or started)
 and when loging in into sugar, if pending jobs are there again a
 notification is displayed, and if a print job is of a particular activity,
 and they are pending, and if the same activity is opened again it
 notification is displayed.

  And are the implementations not prone to modification?
 As in we could specify a particular #print_port to bypass them?


 Allowing activities to print things directly is just asking for trouble.
 Potential attack vector: an activity that has RO access to all documents but
 is denied net access (per their mutual-exclusiveness specified by bitfrost)
 has the ability to send outgoing requests to port 5900 (HP JetDirect port),
 per your printing exception. A black hat, who authored this application,
 sets up a print server at death.example.com. Since the activity can send
 any packet it wishes on that port, it simply prints to this server. The
 attacker now has subverted the bitfrost model, and now has access to all of
 the user's documents.


 --
 Luke Faraone
 http://luke.faraone.cc

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


Re: [Sugar-devel] Fwd: Regarding the print support idea(GSoC)

2009-03-18 Thread Vamsi Krishna Davuluri
Ah, that was the thing I had not understood with the extra credits that were
given. I had thought that functionality had to be added to each desktop so
it would act as a print server. sorry.

Clarify a few things for me :
What exactly was required/meant from/by a print server?
I was in the opinion that each laptop was supposed to act as server for the
network :P
And do we have a powerful server that can act as a print server (which
accepts requests from network, assuming we require network printing)?

And thanks, yes, I have been reading that pdf. I was also thinking using
python-gnome bindings (which are available) to simulate a gnome tool menu.
But this seems better!



On Wed, Mar 18, 2009 at 8:59 PM, Luke Faraone l...@faraone.cc wrote:

 2009/3/18 Vamsi Krishna Davuluri vamsi.davul...@gmail.com

 True enough, but I hadn't been talking about printing from activities
 directly at all for the last half of the mails. :
 But for even CUPS to act as a server and accept incoming requests, it
 would have to excercise freedom to one port atleast, but write a bit of a
 code so that it accepts requests only from local network which ever was
 configured on the router. ;) And, we could specify certain pool of ips which
 are to access the print server.


 Maybe I'm not understanding you properly: is there a reason that we can't
 use the standard CUPS daemon on our print server? Are you saying that the
 individual Sugar desktop should act as a server for *everyone else* in the
 network? CUPS servers should, imho, be left up to the network administrator
 to configure; it is beyond the scale that a child would need to perform on
 their local workstation.

 Sugar's role should be to offer configuration of printers that the local
 system is able to access. You can probably add an extension/plugin to the
 control panel which wraps Debian's 
 system-config-printerhttp://packages.debian.org/sid/system-config-printer,
 which is written in Python and has (AFAICT) no extra dependancies other than
 what sugar already requires. Added/autodetected printers can appear in the
 network view as devices, if you want extra bonus points :)

 --
 Luke Faraone
 http://luke.faraone.cc

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


Re: [Sugar-devel] Fwd: Regarding the print support idea(GSoC)

2009-03-17 Thread Vamsi Krishna Davuluri
Ben, are you going to be mentoring this project?
Or is there a *possible* mentor I can discuss about this on the IRC channel?


On Mon, Mar 16, 2009 at 6:06 PM, Benjamin M. Schwartz wrote:

 Vamsi Krishna Davuluri wrote:
  Thank you!
 
  I think I'll do what you said, I'll just let every activity send the
 print
  request(the file,metadata involved etc) to journal, and use it as a
 global
  dock to print the file.
  So a button in every activity does just that with minimal tweaking
 around.
 
  Did you mean the 'difficult than is necessary' by this, or is there a
 grand
  ring to it, which i need to check again?

 That's all I meant.  Good luck.

 --Ben



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


Re: [Sugar-devel] Regarding GSoC'09 projects (Educational toolkit and VideoChat activity)

2009-03-17 Thread Vamsi Krishna Davuluri
Hello, Ajay

I'm trying to get into GSoC too, and have been looking up projects around
sugar.
Your best bet is to join the #sugar channel on freenode, and talk to people.
Look for the nicks homunq and mchua there :)

But since you are interested, I suggest you get the sugar-jhbuild, which is
a decent tool to get the latest builds.
You can go through the sugar framework, get accustomed to the code, and make
sure you check out the activities code, so you get familiar with the IPC
between them, how the framework is used and   such (as your interest seems
to lie with activities)
Also look up pygtk, if you haven't. Sugar uses it extensively for
menus/interfaces/widgets.

- Vamsi Krishna Davuluri

2009/3/17 Ajay Kumar nitk.a...@gmail.com

 Hi everyone,

  I am Ajay Kumar Chintala, an engineering student from India. I am
 participating in GSoC 09 and found the sugar labs projects 'educational
 toolkit' and 'videoChat activity' intersting. I have knowledge in python and
 am familiar with telepathy. So, i can work on either one of these projects
 provided i do some little ground work for the same. One can implement the
 educational toolkit using telepathy and python.

  I feel that educational toolkit is worth more to the sugarlabs and so i
 want to go with it. Please let me know how i can start working on the same
 so that i can get a clear idea of implementation details and get myself
 ready for the actual project.

 Thanks,
 Ajay.

 ___
 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] Fwd: Regarding the print support idea(GSoC)

2009-03-17 Thread Vamsi Krishna Davuluri
On Wed, Mar 18, 2009 at 10:59 AM, Vamsi Krishna Davuluri 
vamsi.davul...@gmail.com wrote:

 After talking to tomeu, and discovering the pygtk print api,(which through
 backends interacts with the cups api) I think its okay to just include the
 cups api, and then on top of pygtk print (which has modules like page setup,
 printer setup etc) make a nice new tab/ or pop out menu(dialog) in the
 journal which allows configuration. We an even install rights for the bit
 advanced printing functionalites if needed. I think most of the postscript
 editing is taken care by pygtk print, I'll do a bit of research here, if not
 its just simple text editing of the PPD (wiki said that, need to do a bit
 more work here too) :D


 On Wed, Mar 18, 2009 at 3:36 AM, Luke Faraone l...@faraone.cc wrote:

 Sorry, I accidentally pressed send before I had finished! :)


 On Mon, Mar 16, 2009 at 1:50 AM, Vamsi Krishna Davuluri 
 vamsi.davul...@gmail.com wrote:


 Thank you!

 I think I'll do what you said, I'll just let every activity send the
 print request(the file,metadata involved etc) to journal, and use it as a
 global dock to print the file.
 So a button in every activity does just that with minimal tweaking
 around.


 Makes sense.  One should be careful to not expose the CUPS service to
 activities directly, as one of the threats we have to worry about is
 resource abuse. Ideally (IMHO), pressing print should have the object sent
 via the dbus to the journal and a preview dialog with a to menu and a
 options dialog (which brings up the properties configurable by the
 driver).


  On Mon, Mar 16, 2009 at 1:27 AM, Benjamin M. Schwartz 
 bmsch...@fas.harvard.edu wrote:

 [...]

 Perhaps in the drop-down menu for each item in
 the Journal, there could be a Print this item option if the item has a
 MIME type of (pdf, odt, png, jpg...).


 Yes, it would be a good idea to have a list of supported print formats
 for simplicity. PostScript, of course, should be supported as a fallback.

 --
 Luke Faraone
 http://luke.faraone.cc



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


[Sugar-devel] Fwd: Regarding the print support idea(GSoC)

2009-03-15 Thread Vamsi Krishna Davuluri
Hello,

 A Student trying to get into GSoC here

After a bit of research I have come up with this approach for the mandatory
requirements that a printer would assume to comply.

1)Integration of a printing infrastructure (CUPS ??) into the XO-1 software
images  -
pycups is an opensource based wrapper around cups, we could include the
bindings.
Or write bindings entirely from the scratch tailored to serve the purpose
And write a sugar.printer module, which again fits the guidelines, and
communicates through D-BUS with applications

2) Modification of Sugar Control Panel to set up the printer (add/select
default printer?)
  write a pygtk code so that a new tool button is made available, and on
pressing, a menu box pops out, and connect the buttons to the specific
handlers

3)Extra credit: integrating a server, including permissions and quota
management, into the XS image.
The CUPS api allows the machine to act as a print server, and the cups api
includes a default quota management system.
or am i missing something




Thank You,
IwikiwI (Vamsi Krishna Davuluri)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel