Re: [Sugar-devel] Requesting mentor ship for Project related to Sugar
Walter Sir, Thank You very much for accepting to mentor our team on the proposed areas. But there seems to be some problem regarding participation of a team in the Program. It looks like, they only allow individuals to participate. So, we are planning to split the project into two parts: 1. Web browser development. 2. Localization and Porting of Sugar 0.90 to Ubuntu. We are looking for a third project, and would be great to suggest one It would be very helpful if we could have a discussion on this on irc, as soon as possible suiting Indian time. Thanking You. Sincerely, Dipankar On Thu, Apr 7, 2011 at 1:41 AM, Walter Bender walter.ben...@gmail.comwrote: It was a disappointment that we didn't get direct sponsorship for GSoC this year, but working with OSPO may be just the ticket!! Happy to be the mentor on these projects. Note that you should mention that there is a on-going webkit effort for Ubuntu but that Chromium would give us more flexibility and a broader offering. regards. -walter On Wed, Apr 6, 2011 at 3:32 PM, Dipankar Patro dipan...@seeta.in wrote: Hello Walter Sir, I Dipankar Patro, Research Engineer, SEETA, would like to represent my team from SEETA, comprising of Neeraj Gupta, Ishan Bansal, Mukul Gupta with the following proposal of a project. The team members worked in the summer of 2010 for Ubuntu Sugar Remix, (with Manusheel Gupta, SEETA) and also made some successful patch submissions which eventually got pushed in the main repository. The reports regarding our work are published here: http://opensource.seeta.in/task_reports We all want to apply for the GSOC under GOOGLE OSPO: http://www.google-melange.com/gsoc/org/google/gsoc2011/ospo We would like to work on the following areas related to Sugar, and would highly appreciate if you could mentor us. We will be presenting the same areas as below for GSOC. The following are proposed areas: 1. Developing a faster, secure and customizable browser activity for Ubuntu Sugar Remix. Since Ubuntu Sugar Remix does not have a stable 'Browse' activity due to the hulahop package problem, we aim to develop a new browser activity implementing Google Chrominum base and functionality making the browser faster, secure and customizable. The same activity can be used for XO where the performance is crucial given the hardware specifications it has. 2. Successful porting of Sugar 0.90 on Ubuntu along with upgrading the existing activities. Sugar is rapidly developing and we feel the need to be same with the Ubuntu Sugar Remix. Porting Sugar 0.90 to USR will be the first step in providing the latest compatible version of Sugar to Ubuntu Users. 3. Localisation in India If Sugar needs to be spread across in India, we feel the need of incorporating regional languages into it. This would include activities and applications available in regional languages. A new reason why Sugar can be used in Classrooms, even in Sub-Urban areas. For the above, we have planned the following structure of working and road map: All members have experience of working on the Sugar back-end (where the code needs to be written or modified). I have some knowledge of networking, and would like continue to work on the same field for Sugar. Mukul and Ishan are experienced with working on activities. Ishan specially worked with Gtk end of activities, where as Mukul worked on the coding portion. As Neeraj has experience in the field of localization and has also worked on it, he will be the one specially working on the localization. For road map please visit this page: http://opensource.seeta.in/roadmap As you have incomparable experience in activity development on Sugar, we are seeking for your expert guidance on the whole browser activity development, which will definitely lead us to an outstanding achievement, and also help Sugar grow and spread more rapidly. Thank You for taking out time for us. Regards, Dipankar Patro, dipan...@seeta.in Neeraj Gupta, nee...@seeta.in Ishan Bansal, is...@seeta.in Mukul Gupta, mu...@seeta.in -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Requesting mentor ship for Project related to Sugar
Walter Sir, Sorry I was not clear in my previous mail. The two projects that we will be sending proposal for: - Web browser development for Sugar on Chromium base. - Localization and Porting Sugar 0.90 packages. On Thu, Apr 7, 2011 at 11:29 PM, Walter Bender walter.ben...@gmail.comwrote: On Thu, Apr 7, 2011 at 1:46 PM, Dipankar Patro dipan...@seeta.in wrote: Walter Sir, Thank You very much for accepting to mentor our team on the proposed areas. But there seems to be some problem regarding participation of a team in the Program. It looks like, they only allow individuals to participate. So, we are planning to split the project into two parts: 1. Web browser development. 2. Localization and Porting of Sugar 0.90 to Ubuntu. Why not split these into two projects? -walter We are looking for a third project, and would be great to suggest one It would be very helpful if we could have a discussion on this on irc, as soon as possible suiting Indian time. Thanking You. Sincerely, Dipankar On Thu, Apr 7, 2011 at 1:41 AM, Walter Bender walter.ben...@gmail.com wrote: It was a disappointment that we didn't get direct sponsorship for GSoC this year, but working with OSPO may be just the ticket!! Happy to be the mentor on these projects. Note that you should mention that there is a on-going webkit effort for Ubuntu but that Chromium would give us more flexibility and a broader offering. regards. -walter On Wed, Apr 6, 2011 at 3:32 PM, Dipankar Patro dipan...@seeta.in wrote: Hello Walter Sir, I Dipankar Patro, Research Engineer, SEETA, would like to represent my team from SEETA, comprising of Neeraj Gupta, Ishan Bansal, Mukul Gupta with the following proposal of a project. The team members worked in the summer of 2010 for Ubuntu Sugar Remix, (with Manusheel Gupta, SEETA) and also made some successful patch submissions which eventually got pushed in the main repository. The reports regarding our work are published here: http://opensource.seeta.in/task_reports We all want to apply for the GSOC under GOOGLE OSPO: http://www.google-melange.com/gsoc/org/google/gsoc2011/ospo We would like to work on the following areas related to Sugar, and would highly appreciate if you could mentor us. We will be presenting the same areas as below for GSOC. The following are proposed areas: 1. Developing a faster, secure and customizable browser activity for Ubuntu Sugar Remix. Since Ubuntu Sugar Remix does not have a stable 'Browse' activity due to the hulahop package problem, we aim to develop a new browser activity implementing Google Chrominum base and functionality making the browser faster, secure and customizable. The same activity can be used for XO where the performance is crucial given the hardware specifications it has. 2. Successful porting of Sugar 0.90 on Ubuntu along with upgrading the existing activities. Sugar is rapidly developing and we feel the need to be same with the Ubuntu Sugar Remix. Porting Sugar 0.90 to USR will be the first step in providing the latest compatible version of Sugar to Ubuntu Users. 3. Localisation in India If Sugar needs to be spread across in India, we feel the need of incorporating regional languages into it. This would include activities and applications available in regional languages. A new reason why Sugar can be used in Classrooms, even in Sub-Urban areas. For the above, we have planned the following structure of working and road map: All members have experience of working on the Sugar back-end (where the code needs to be written or modified). I have some knowledge of networking, and would like continue to work on the same field for Sugar. Mukul and Ishan are experienced with working on activities. Ishan specially worked with Gtk end of activities, where as Mukul worked on the coding portion. As Neeraj has experience in the field of localization and has also worked on it, he will be the one specially working on the localization. For road map please visit this page: http://opensource.seeta.in/roadmap As you have incomparable experience in activity development on Sugar, we are seeking for your expert guidance on the whole browser activity development, which will definitely lead us to an outstanding achievement, and also help Sugar grow and spread more rapidly. Thank You for taking out time for us. Regards, Dipankar Patro, dipan...@seeta.in Neeraj Gupta, nee...@seeta.in Ishan Bansal, is...@seeta.in Mukul Gupta, mu...@seeta.in -- Walter Bender Sugar Labs http://www.sugarlabs.org -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http
Re: [Sugar-devel] Requesting mentor ship for Project related to Sugar
Ganesh, I have not mentioned anywhere that the development we want to do should be in propriety manner. We will be developing as a group and once there is a successful release, the code will always be free to use and modify. There will not be any restriction on what others want to modify the code for. :) As far as the browser activity is concerned, since we want to use chromium base for flexibility, thus contacting Google. We are also up for FOSS, but somebody has to start and make it ready before sharing his/her code to outer world. We are doing the same. :) Even if the proposal is rejected, we are thinking of continuing in summer 2011 anyways. On Fri, Apr 8, 2011 at 12:34 AM, ganesh gajre ganeshga...@gmail.com wrote: Dipankar, We are talking about Free software and Sweet application like a Sugar. Which creates the whole new world for FOSS and education. I don't understand how can you write the proposal you want to do in such a proprietry format. Lot's of developement FOSS has done in office. We have OpenOffice, Libreoffice, write activity and lot other FOSS based office tools, agreed we give support to MS too, it not means that we want to promote it... :P When we say Ubuntu, Sugar, or any other FOSS tools. We should Mean It from heart. This is just my thoughts when I deal with FOSS v/s proprietary Apps and format. On Fri, Apr 8, 2011 at 12:22 AM, Dipankar Patro dipan...@seeta.in wrote: Walter Sir, Please find our draft for proposal in attachment. Thank You. Sincerely, Dipankar ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Ganesh (Dragger) Be a FOSSERS, use GNU/Linux ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Requesting mentor ship for Project related to Sugar
Hello Walter Sir, I Dipankar Patro, Research Engineer, SEETA, would like to represent my team from SEETA, comprising of Neeraj Gupta, Ishan Bansal, Mukul Gupta with the following proposal of a project. The team members worked in the summer of 2010 for Ubuntu Sugar Remix, (with Manusheel Gupta, SEETA) and also made some successful patch submissions which eventually got pushed in the main repository. The reports regarding our work are published here: http://opensource.seeta.in/task_reports We all want to apply for the GSOC under GOOGLE OSPO: http://www.google-melange.com/gsoc/org/google/gsoc2011/ospo We would like to work on the following areas related to Sugar, and would highly appreciate if you could mentor us. We will be presenting the same areas as below for GSOC. - The following are proposed areas: * * 1. *Developing a faster, secure and customizable browser activity for Ubuntu Sugar Remix.* Since Ubuntu Sugar Remix does not have a stable 'Browse' activity due to the hulahop package problem, we aim to develop a new browser activity implementing Google Chrominum base and functionality making the browser faster, secure and customizable. The same activity can be used for XO where the performance is crucial given the hardware specifications it has. 2. *Successful porting of Sugar 0.90 on Ubuntu along with upgrading the existing activities*. Sugar is rapidly developing and we feel the need to be same with the Ubuntu Sugar Remix. Porting Sugar 0.90 to USR will be the first step in providing the latest compatible version of Sugar to Ubuntu Users. 3. *Localisation in India* If Sugar needs to be spread across in India, we feel the need of incorporating regional languages into it. This would include activities and applications available in regional languages. A new reason why Sugar can be used in Classrooms, even in Sub-Urban areas. - For the above, we have planned the following *structure of working and road map*: All members have experience of working on the Sugar back-end (where the code needs to be written or modified). I have some knowledge of networking, and would like continue to work on the same field for Sugar. Mukul and Ishan are experienced with working on activities. Ishan specially worked with Gtk end of activities, where as Mukul worked on the coding portion. As Neeraj has experience in the field of localization and has also worked on it, he will be the one specially working on the localization. For road map please visit this page: http://opensource.seeta.in/roadmap As you have incomparable experience in activity development on Sugar, we are seeking for your expert guidance on the whole browser activity development, which will definitely lead us to an outstanding achievement, and also help Sugar grow and spread more rapidly. Thank You for taking out time for us. Regards, Dipankar Patro, dipan...@seeta.in Neeraj Gupta, nee...@seeta.in Ishan Bansal, is...@seeta.in Mukul Gupta, mu...@seeta.in ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH v4 sugar] Time out on registration process to prevent indefinite UI hang (SL#2289)
Hi Simon, When I was working on the issue, I was using an emulator on Ubuntu to run Sugar (USR). Is the problem occurring on a XO? The only reason to use the TimeoutTransport here is to add a timeout with registration server connection process, which was not there before. The problem seems to be related to library 'httplib'. Let me check out on that. Regards, Dipankar On Thu, Mar 24, 2011 at 1:35 AM, Simon Schampijer si...@schampijer.dewrote: On 09/20/2010 10:45 AM, Dipankar Patro wrote: Registration with the school server is currently done synchronously. To prevent the UI from hanging indefinitely, if the school server is reachable but unresponsive, we add an explicit timeout. --- Hi Dipankar, I lately see this error [1] when trying to connect to a schoolserver. Maybe you (or someone else) have an idea what the issue is. If I do construct the ServerProxy without the _TimeoutTransport the registration will continue. Regards, Simon [1] http://dev.laptop.org/ticket/10776 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Research: 0.84 Launcher Cost
Hello James, I was going through the discussion over the bug #2080 handled currently by Anurag. I too was thinking of replacing the animation algo, which currently is sine function. I was having some questions in mind after looking at your research. When launcher is disabled, the time saving is more, as compared to SVG complexity. If we are not for removing animation, then why not use a simple integer based algorithm instead of a floating based sine algorithm. In terms of graphics, integer based algorithms (Bresenham, Mid-point, etc) work faster than floating point based. If we can use a 'Busy-Cursor' then its fine. But if we still want to continue with the animation, why not change the algorithm for the animation that is done? Regards, Dipankar On Thu, Oct 28, 2010 at 9:04 AM, James Cameron qu...@laptop.org wrote: Earlier in the context of SL#2080 patch review, I had said the launcher is stealing CPU cycles from the startup of the activity, the task run queue shows this during a launch. I wonder if activities might start up faster if there was no launcher, just a busy cursor. Looks like activities would start faster; between one and four seconds, mostly depending on the activity, and slightly depending on the icon complexity. Details below. -- Research: will activities start faster if there is no launcher? Method: using an XO-1, freshly installed with Sugar 0.84.22, as part of OLPC OS 10.1.2 build os852, test the startup time of three activities (Memorize, Moon and Chat), remove the launcher, retest, subtract. The launcher is implemented by source file launcher.py in /usr/lib/python2.6/site-packages/jarabe/view/ ... the modification made is attached as a patch. The times were captured with a stopwatch. The timing began when Start was selected from the list view, and ended once the activity had completed display of the UI. Result: a. unmodified launcher.py Memorize-34 9.43s, 9.56s, 9.51s Moon-11 11.58s, 11.60s, 11.65s Chat-65 6.65s, 6.54s, 6.59s b. modified launcher.py (black background, no animation), Memorize-34 7.60s, 7.63s, 7.60s Moon-11 7.78s, 7.78s, 7.95s Chat-65 5.04s, 4.93s, 4.88s c. calculated cost of launcher Memorize-34 1.89s Moon-11 3.73s Chat-65 1.64s Diagnosis: removing the launcher animation saved between one and four seconds of startup time. The saving was greatest for the Moon activity. -- Research: determine if the SVG icon for the Moon activity contributes to the delay. Method: swap the icons, restart Sugar, retest only Chat activity with Moon icon. Result: a. unmodified launcher.py Chat-65 7.83s, 7.59s, 7.62s b. modified launcher.py (black background, no animation), Chat-65 4.99s, 4.87s, 4.90s c. calculated cost of launcher Chat-65 2.75s (greater than previous) d. calculated cost of moon icon over chat icon Chat-65 1.09s Diagnosis: the degree of saving has a little to do with the SVG icon complexity. The degree of saving has much to do with the mix of operations performed by the activity during startup. -- So, between 23 and 92 wasted days of looking at the launcher across two million laptops. Good time to think and plan, kids. -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH v2] Removed hardcoded server url (SL #1976)
Previously registration url was set hardcoded for XO device. Modififed the code for same behavior on all devices. Register url is taken from gconf prop. If the gconf is empty or unset, registration url falls back to 'schoolserver'. --- src/jarabe/desktop/schoolserver.py |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) v1 was reviewed by James Cameron qu...@laptop.org v2 : wrapped the commit message. diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index a05f56c..57b7ddf 100644 --- a/src/jarabe/desktop/schoolserver.py +++ b/src/jarabe/desktop/schoolserver.py @@ -89,9 +89,12 @@ def register_laptop(url=REGISTER_URL): else: sn = generate_serial_number() uuid_ = str(uuid.uuid1()) -setting_name = '/desktop/sugar/collaboration/jabber_server' -jabber_server = client.get_string(setting_name) -store_identifiers(sn, uuid_, jabber_server) + +setting_name = '/desktop/sugar/collaboration/jabber_server' +jabber_server = client.get_string(setting_name) +store_identifiers(sn, uuid_, jabber_server) + +if jabber_server: url = 'http://' + jabber_server + ':8080/' nick = client.get_string('/desktop/sugar/user/nick') -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar] Removed hardcoded server url (SL #1976)
Glad I could clarify my modifications. :) I will send the corrected e-mail as soon as possible. On Thu, Oct 14, 2010 at 4:29 AM, James Cameron qu...@laptop.org wrote: On Wed, Oct 13, 2010 at 04:31:00PM +0530, Dipankar Patro wrote: Thanks for reviewing it, James. Sorry, it was late, and I misunderstood the code you had written ... I withdraw my comment You are effectively repeating the previous if statement but using the output ... seems a bit obscure. Apart from the lack of text wrap in the commit message, I've no issues with the patch. Reviewed-by: James Cameron qu...@laptop.org -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar] Removed hardcoded server url (SL #1976)
Previously registration url was set hardcoded for XO device. Modififed the code for same behavior on all devices. Register url is taken from gconf prop. If the gconf is empty or unset, registration url falls back to 'schoolserver'. --- src/jarabe/desktop/schoolserver.py |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index a05f56c..57b7ddf 100644 --- a/src/jarabe/desktop/schoolserver.py +++ b/src/jarabe/desktop/schoolserver.py @@ -89,9 +89,12 @@ def register_laptop(url=REGISTER_URL): else: sn = generate_serial_number() uuid_ = str(uuid.uuid1()) -setting_name = '/desktop/sugar/collaboration/jabber_server' -jabber_server = client.get_string(setting_name) -store_identifiers(sn, uuid_, jabber_server) + +setting_name = '/desktop/sugar/collaboration/jabber_server' +jabber_server = client.get_string(setting_name) +store_identifiers(sn, uuid_, jabber_server) + +if jabber_server: url = 'http://' + jabber_server + ':8080/' nick = client.get_string('/desktop/sugar/user/nick') -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar] Removed hardcoded server url (SL #1976)
Thanks for reviewing it, James. if have_ofw_tree(): sn = read_ofw('mfg-data/SN') uuid_ = read_ofw('mfg-data/U#') sn = sn or 'SHF' uuid_ = uuid_ or '----' else: sn = generate_serial_number() uuid_ = str(uuid.uuid1()) -setting_name = '/desktop/sugar/collaboration/jabber_server' -jabber_server = client.get_string(setting_name) -store_identifiers(sn, uuid_, jabber_server) + +setting_name = '/desktop/sugar/collaboration/jabber_server' +jabber_server = client.get_string(setting_name) +store_identifiers(sn, uuid_, jabber_server) + +if jabber_server: url = 'http://' + jabber_server + ':8080/' You are effectively repeating the previous if statement but using the output ... seems a bit obscure. ^^ Before applying this : The url (url for registration) was set from gconf only for non-XO devices. I moved that outside the first if..else you have quoted, so that on all devices the url is taken from the gconf property (/desktop/sugar/collaboration/jabber_server) the second 'if jabber_server:' is put there to check whether the jabber_server retrieved from the gcnof property is empty or unset. If jabber_server is a valid one, then change url, other wise keep the url = initialized one. I actually went with the above modification due to the chain of mails here : http://lists.sugarlabs.org/archive/sugar-devel/2010-July/025265.html Regards, Dipankar ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH v3 sugar] Run Sugar-Emulator in fullscreen by default if the screen is =800x600 (SL #2180)
Thanks Tomeu for the acceptance. On Tue, Oct 5, 2010 at 3:02 PM, Tomeu Vizoso to...@sugarlabs.org wrote: On Mon, Sep 27, 2010 at 20:35, Dipankar Patro dipan...@seeta.in wrote: Previously some bottom part of sugar emulator window was pushed out of viewing area at 800x600 system resolution. The patch opens Sugar-emulator in fullscreen mode by default for resolutions = 800x600 to avoid the above mentioned situation. Thanks, will push once we branch, please ping if I forget about it. Regards, Tomeu --- src/jarabe/util/emulator.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) v2 was Reviewed-By Tomeu Vizoso to...@sugarlabs.org v2-v3 : Changed commit message for proper description of patch. diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py index 6a43044..cc112c9 100644 --- a/src/jarabe/util/emulator.py +++ b/src/jarabe/util/emulator.py @@ -42,7 +42,7 @@ def _run_xephyr(display, dpi, dimensions, fullscreen): screen_size = (gtk.gdk.screen_width(), gtk.gdk.screen_height()) if (not dimensions) and (fullscreen is None) and \ - (screen_size default_dimensions) : + (screen_size = default_dimensions) : # no forced settings, screen too small = fit screen fullscreen = True elif (not dimensions) : -- 1.7.0.4 ___ 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] Replacing Illegal character ':' in username (SL #2152)
Bernie, On Mon, Oct 4, 2010 at 12:53 AM, Bernie Innocenti ber...@codewiz.orgwrote: If you want to ensure that I read a message intended for me, you'd better keep me on cc. I don't read every single post sent to sugar-devel. * Sorry. Will follow it from now on. On Sun, 2010-10-03 at 00:12 +0530, Dipankar Patro wrote: I am currently facing some problem with XS setup. I downloaded the image and installed it on VMware. But that did not work. What failed exactly? I am unable to find a way to connect to my network while running XS. I actually installed XS software on VMware under Windows 7, and its showing me CUI. Got totally confused and finally left it. :( Bernie, is there no online school-server available where I can connect to and check? Bernie, Since the school server setup may take up a day or two, I can definitely work on the bug #1976 in the meantime. I will send the patch as soon as it is ready and tested. Thanks. Please make sure that, in the default case when nothing is configured, the behavior on the XO-1 stays the same as before. Findings on Bug #1976: - Initially I was not able to track whether the jabber_server we are setting is actually being set or not. (I am using sugar-emulator in Ubuntu). Thanks to Aleskey who figured out how Sugar is storing info (jabber_server) in a second instance of gconf! - Now, Bernie, I am confused with the bug :(. What are we really trying to remove? It would be great if you could explain the statement: to keep the old behavior, this patch would also need to set the default value of /desktop/sugar/collaboration/jabber_server to schoolserver ^^ Does this mean that I need to set the jabber_server property to schoolserver at the time of first boot? ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)
Hi all, I am currently facing some problem with XS setup. I downloaded the image and installed it on VMware. But that did not work. So I moved on to the three pointers that Bernie provided. I have removed the use of re and am searching for a filter the input of the gtk Entry widget. I also searched for first time boot check (jarabe/intro/) [Thanks to Aleskey who helped me with the first time boot code.] Bernie, Since the school server setup may take up a day or two, I can definitely work on the bug #1976 in the meantime. I will send the patch as soon as it is ready and tested. Sascha, I agree with you, there should be ready-made Live CD kind of thing for XS. Just plug and test! :-) Regards, Dipankar On Sat, Oct 2, 2010 at 1:53 PM, Sascha Silbe sascha-ml-reply-to-201...@silbe.org wrote: Excerpts from Dipankar Patro's message of Fri Oct 01 21:00:57 +0200 2010: Thanks Sascha for the patch. The credit belongs to Tim McNamara, not me. :) Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ ___ 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] Replacing Illegal character ':' in username (SL #2152)
Hi, Thanks Sascha for the patch. Bernie, I seem to be not getting the key pointers. I think you are suggesting me to setup a School Server on my machine. Martin, I am following this site for XS installation: http://wiki.laptop.org/go/XS_Installing_Software Am I on correct path? Also, after setting the server, how shall I proceed. I have figured out the following steps so far: - Download and install XS software from here: http://wiki.laptop.org/go/XS_Installing_Software - Monitor the traffic. (Not sure about idmgr, couldn't find the package for Ubuntu too) - ^^ For setting up XS I think I will have to setup a server Apache. Dipankar On Thu, Sep 30, 2010 at 10:18 PM, Sascha Silbe sascha-ml-reply-to-201...@silbe.org wrote: Excerpts from Bernie Innocenti's message of Thu Sep 30 17:42:17 +0200 2010: In the absense of a real test schoolserver, [...] It would be nice if somebody could prepare a VM image containing an XS installation. Note that the editable field for the collaboration server in the CP does not affect schoolserver registration on the XO. This is another bug in my opinion, feel free to submit a separate path providing a unified behavior for the XO and normal laptop cases. For reference: That's #1976 [1]. Tim already provided a patch several months ago, but it needs some minor polishing. [2] Sascha [1] https://bugs.sugarlabs.org/ticket/1976 [2] http://lists.sugarlabs.org/archive/sugar-devel/2010-July/thread.html#25265 -- http://sascha.silbe.org/ http://www.infra-silbe.de/ ___ 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] Bug No. #398
Shan, I think we should get back to the original format and try to implement the search with the existing functions. For the first target, since the hilite word function is nowhere to be found so far for gtk2viewer, try to implement a system in which you can hilite the line of the search text, like I said that day. Try your best. About git diff, do as Tomeu instructed. run git diff inside jhbuild. Sorry about that day, on which I hurriedly explained you how to create a gut diff file in a source dir itself. Regards, Dipankar On Thu, Sep 30, 2010 at 3:08 PM, Tomeu Vizoso to...@sugarlabs.org wrote: On Wed, Sep 29, 2010 at 17:49, Shanjit Singh Jajmann shan...@dev.seeta.in wrote: Hi, I have changed a few things in viewsource.py, and i am posting the diff file, You should be making changes in sugar-jhbuild/source/sugar and use git diff to generate the diff. Ask your colleagues in Seeta if you have doubts. the issue still remains the same although i have changed view type from gtksourceview2 to gtk.textview. I have no idea why you think changing that may have helped with whatever problems you have found. Regards, Tomeu --- git diff file. diff --git a/install/lib/python2.6/site-packages/jarabe/view/viewsource.py b/install/lib/python2.6/site-packages/jarabe/view/viewsource.py index 524db9e..24e361c 100644 --- a/install/lib/python2.6/site-packages/jarabe/view/viewsource.py +++ b/install/lib/python2.6/site-packages/jarabe/view/viewsource.py @@ -321,18 +321,18 @@ class Toolbar(gtk.Toolbar): search_item.show() search_entry.show() -_search_prev = ToolButton('go-previous-paired') -_search_prev.set_tooltip(_('Previous')) -#self._search_prev.connect('clicked', self._search_prev_cb) -self.insert(_search_prev, -1) -_search_prev.show() +self._search_prev = ToolButton('go-previous-paired') +self._search_prev.set_tooltip(_('Previous')) +self._search_prev.connect('clicked', self._search_prev_cb) +self.insert(self._search_prev, -1) +self._search_prev.show() -_search_next = ToolButton('go-next-paired') -_search_next.set_tooltip(_('Next')) -#self._search_next.connect('clicked', self._search_next_cb) -self.insert(_search_next, -1) -_search_next.show() -#self._update_search_buttons() +self._search_next = ToolButton('go-next-paired') +self._search_next.set_tooltip(_('Next')) +self._search_next.connect('clicked', self._search_next_cb) +self.insert(self._search_next, -1) +self._search_next.show() +self._update_search_buttons() stop = ToolButton(icon_name='dialog-cancel') @@ -343,10 +343,30 @@ class Toolbar(gtk.Toolbar): def _search_entry_activate_cb(self, entry): self.viewer.set_search_text(entry.props.text) +self._update_search_buttons() def _search_entry_changed_cb(self, entry): self.viewer.set_search_text(entry.props.text) - +self._update_search_buttons() + +def _search_prev_cb(self, button): +self.viewer.search_next('backward') +self._update_search_buttons() + +def _search_next_cb(self, button): +self.viewer.search_next('forward') +self._update_search_buttons() + +def _update_search_buttons(self,): +if len(self.viewer.search_text) == 0: +self._search_prev.props.sensitive = False +self._search_next.props.sensitive = False +else: +prev = self.viewer.get_next_result('backward') +next = self.viewer.get_next_result('forward') +self._search_prev.props.sensitive = prev != None +self._search_next.props.sensitive = next != None + def _add_separator(self, expand=False): separator = gtk.SeparatorToolItem() separator.props.draw = False @@ -452,22 +472,88 @@ class SourceDisplay(gtk.ScrolledWindow): self._buffer = gtksourceview2.Buffer() self._buffer.set_highlight_syntax(True) -self._source_view = gtksourceview2.View(self._buffer) -self._source_view.set_editable(False) -self._source_view.set_cursor_visible(True) -self._source_view.set_show_line_numbers(True) -self._source_view.set_show_right_margin(True) -self._source_view.set_right_margin_position(80) +self.search_text = ' ' + +#self._source_view = gtksourceview2.View(self._buffer) +#self._source_view.set_editable(False) +#self._source_view.set_cursor_visible(True) +#self._source_view.set_show_line_numbers(True) +#self._source_view.set_show_right_margin(True) +#self._source_view.set_right_margin_position(80)
Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)
Martin, Thanks for your suggestions. I did searched something on GECOS, and I was directed again to /etc/passwd file which maintains user info in an OS. Could you elaborate the test process a bit please? I didn't get you clearly. The only point I could get is that server registration doesn't depend on nick / username. If it does in code then I should remove the dependency? Bernie, I have some questions, * you asked me about setting up a XS. I have a XO, a laptop and a router. I have this link too : http://wiki.laptop.org/go/XS_Installing_Software :P. Am I on right direction for setting up a XS? * After setting up the XS, what should I check? 'cause you mentioned in the comment: 1. refusing the : character in the name input field of the first boot and About Me control panel. 2. converting each : to _ when sending the registration to the schoolserver. 3. in idmgr, convert : to _ as well. I think I have found the code for 1st one. 2nd I think I know where to look into (schoolserver.py). 3rd one, I have no clue :P Wish you could help me with above. Regards, Dipankar On Thu, Sep 30, 2010 at 7:55 PM, Bernie Innocenti ber...@codewiz.orgwrote: On 09/30/10 01:13, Martin Langhoff wrote: On Wed, Sep 29, 2010 at 1:32 PM, Dipankar Patro dipan...@seeta.in wrote: With reference to bug : http://bugs.sugarlabs.org/ticket/2152 The diagnosis of the bug is incorrect. We never use the user-selected 'nickname' as a username in the XS. We do provide it as in the GECOS info, and there may be a bug in that. The diagnosis of the bug is vague: the Sugar username becomes the UNIX *gecos* on the XS. -- // Bernie Innocenti - http://codewiz.org/ \X/ Sugar Labs - http://sugarlabs.org/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH v3 sugar] Work around for fullscreen bug (SL #2180)
Previously some bottom part of sugar emulator window was pushed out of viewing area at 800x600 system resolution. The patch opens Sugar-emulator in fullscreen mode for resolutions = 800x600 to avoid the above mentioned situation. --- src/jarabe/util/emulator.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) v2 was Reviewed by Tomeu Vizoso v2-v3 : Changed commit message for proper description of patch. diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py index 6a43044..cc112c9 100644 --- a/src/jarabe/util/emulator.py +++ b/src/jarabe/util/emulator.py @@ -42,7 +42,7 @@ def _run_xephyr(display, dpi, dimensions, fullscreen): screen_size = (gtk.gdk.screen_width(), gtk.gdk.screen_height()) if (not dimensions) and (fullscreen is None) and \ - (screen_size default_dimensions) : + (screen_size = default_dimensions) : # no forced settings, screen too small = fit screen fullscreen = True elif (not dimensions) : -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH v3 sugar] Run Sugar-Emulator in fullscreen by default if the screen is =800x600 (SL #2180)
Previously some bottom part of sugar emulator window was pushed out of viewing area at 800x600 system resolution. The patch opens Sugar-emulator in fullscreen mode by default for resolutions = 800x600 to avoid the above mentioned situation. --- src/jarabe/util/emulator.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) v2 was Reviewed-By Tomeu Vizoso to...@sugarlabs.org v2-v3 : Changed commit message for proper description of patch. diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py index 6a43044..cc112c9 100644 --- a/src/jarabe/util/emulator.py +++ b/src/jarabe/util/emulator.py @@ -42,7 +42,7 @@ def _run_xephyr(display, dpi, dimensions, fullscreen): screen_size = (gtk.gdk.screen_width(), gtk.gdk.screen_height()) if (not dimensions) and (fullscreen is None) and \ - (screen_size default_dimensions) : + (screen_size = default_dimensions) : # no forced settings, screen too small = fit screen fullscreen = True elif (not dimensions) : -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Bug 2318
Hi all, I am working on the bug : http://bugs.sugarlabs.org/ticket/2318 I tried changing the class JournalButton in jarabe/journal/volumestoolbar.py as follows http://paste.ubuntu.com/499852/ It seems that the volume info still does not appear. I think it is somewhat related to right click key handler, because in other places (frame, home view) the volume info appears as a right click popup. Would be great if you some could provide some pointers on the views above. Regards, Dipankar ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Bug #1742
Hi, I am working on the bug : http://bugs.sugarlabs.org/ticket/1742 I investigated a bit and found that the BuddyMenu in Neighbourhood view is not getting updated without restart. It would be helpful to get some pointers on how to update the buddy status without restarting in BuddyMenu. Regards, Dipankar ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH v4 sugar] Time out on registration process to prevent indefinite UI hang (SL#2289)
Registration with the school server is currently done synchronously. To prevent the UI from hanging indefinitely, if the school server is reachable but unresponsive, we add an explicit timeout. --- src/jarabe/desktop/schoolserver.py | 27 --- 1 files changed, 24 insertions(+), 3 deletions(-) v2 was Reviewed-By: Sascha Silbe sascha-pgp at silbe.org v3 was Reviewed-By: Sascha Silbe sascha-pgp at silbe.org v3-v4: Rebased on current mainline/master diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index a05f56c..69113ee 100644 --- a/src/jarabe/desktop/schoolserver.py +++ b/src/jarabe/desktop/schoolserver.py @@ -16,8 +16,9 @@ import logging from gettext import gettext as _ -from xmlrpclib import ServerProxy, Error +import xmlrpclib import socket +import httplib import os from string import ascii_uppercase import random @@ -30,6 +31,7 @@ from sugar import env from sugar.profile import get_profile REGISTER_URL = 'http://schoolserver:8080/' +REGISTER_TIMEOUT = 8 def generate_serial_number(): Generates a serial number based on 3 random uppercase letters @@ -76,6 +78,25 @@ def store_identifiers(serial_number, uuid, backup_url): class RegisterError(Exception): pass + +class TimeoutHTTP(httplib.HTTP): + +def __init__(self, host='', port=None, strict=None, timeout=None): +if port == 0: +port = None +# FIXME: Depending on undocumented internals that can break between +# Python releases. Please have a look at SL #2350 +self._setup(self._connection_class(host, + port, strict, timeout=REGISTER_TIMEOUT)) + + +class TimeoutTransport(xmlrpclib.Transport): + +def make_connection(self, host): +host, extra_headers, x509 = self.get_host_info(host) +return TimeoutHTTP(host, timeout=REGISTER_TIMEOUT) + + def register_laptop(url=REGISTER_URL): profile = get_profile() @@ -96,10 +117,10 @@ def register_laptop(url=REGISTER_URL): nick = client.get_string('/desktop/sugar/user/nick') -server = ServerProxy(url) +server = xmlrpclib.ServerProxy(url, TimeoutTransport()) try: data = server.register(sn, nick, uuid_, profile.pubkey) -except (Error, TypeError, socket.error): +except (xmlrpclib.Error, TypeError, socket.error): logging.exception('Registration: cannot connect to server') raise RegisterError(_('Cannot connect to the server.')) -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] Time out on registration process to prevent indefinite UI hang (SL#2289)
Registration with the school server is currently done synchronously. To prevent the UI from hanging indefinitely, if the school server is reachable but unresponsive, we add an explicit timeout. Reviewed-By: Sascha Silbe sascha-...@silbe.org --- src/jarabe/desktop/schoolserver.py | 27 --- 1 files changed, 24 insertions(+), 3 deletions(-) v2 was Reviewed by: Sascha Silbe sascha-...@silbe.org v2-v3: Rebased on current mainline/master diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index a05f56c..a1c8c26 100644 --- a/src/jarabe/desktop/schoolserver.py +++ b/src/jarabe/desktop/schoolserver.py @@ -16,8 +16,9 @@ import logging from gettext import gettext as _ -from xmlrpclib import ServerProxy, Error +import xmlrpclib import socket +import httplib import os from string import ascii_uppercase import random @@ -30,6 +31,7 @@ from sugar import env from sugar.profile import get_profile REGISTER_URL = 'http://schoolserver:8080/' +REGISTER_TIMEOUT = 8 def generate_serial_number(): Generates a serial number based on 3 random uppercase letters @@ -76,6 +78,25 @@ def store_identifiers(serial_number, uuid, backup_url): class RegisterError(Exception): pass + +class TimeoutHTTP(httplib.HTTP): + +def __init__(self, host='', port=None, strict=None, timeout=None): +if port == 0: +port = None +# FIXME: Depending on undocumented internals that can break between +# Python releases. +self._setup(self._connection_class(host, + port, strict, timeout=REGISTER_TIMEOUT)) + + +class TimeoutTransport(xmlrpclib.Transport): + +def make_connection(self, host): +host, extra_headers, x509 = self.get_host_info(host) +return TimeoutHTTP(host, timeout=REGISTER_TIMEOUT) + + def register_laptop(url=REGISTER_URL): profile = get_profile() @@ -96,10 +117,10 @@ def register_laptop(url=REGISTER_URL): nick = client.get_string('/desktop/sugar/user/nick') -server = ServerProxy(url) +server = xmlrpclib.ServerProxy(url, TimeoutTransport()) try: data = server.register(sn, nick, uuid_, profile.pubkey) -except (Error, TypeError, socket.error): +except (xmlrpclib.Error, TypeError, socket.error): logging.exception('Registration: cannot connect to server') raise RegisterError(_('Cannot connect to the server.')) -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] Setting logging level of message Gsm connection not set... to warning from exception (SL #2247)
Currently the message appears as an error whereas it is just a warning message. Developer should not get this message an error, so I have set the logging level to warning from exception. --- src/jarabe/model/network.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py index 79e4360..72fa00a 100644 --- a/src/jarabe/model/network.py +++ b/src/jarabe/model/network.py @@ -891,7 +891,7 @@ def load_gsm_connection(): except Exception: logging.exception('Error adding gsm connection to NMSettings.') else: -logging.exception(No gsm connection was set in GConf.) +logging.warning(No gsm connection was set in GConf.) def load_connections(): load_wifi_connections() -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] Time out on registration process to prevent indefinite UI hang (SL#2289)
Registration with the school server is currently done synchronously. To prevent the UI from hanging indefinitely, if the school server is reachable but unresponsive, we add an explicit timeout. --- src/jarabe/desktop/schoolserver.py | 22 +++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index 62519df..908b58d 100644 --- a/src/jarabe/desktop/schoolserver.py +++ b/src/jarabe/desktop/schoolserver.py @@ -16,7 +16,8 @@ import logging from gettext import gettext as _ -from xmlrpclib import ServerProxy, Error +import httplib +import xmlrpclib import socket import os import string @@ -30,6 +31,7 @@ from sugar import env from sugar.profile import get_profile REGISTER_URL = 'http://schoolserver:8080/' +REGISTER_TIMEOUT = 8 def generate_serial_number(): Generates a serial number based on 3 random uppercase letters @@ -76,6 +78,20 @@ def store_identifiers(serial_number, uuid, backup_url): class RegisterError(Exception): pass +class TimeoutHTTP(httplib.HTTP): +def __init__(self, host='', port=None, strict=None, timeout = None): +if port == 0: +port = None +# FIXME: we are depending on undocumented internals that can break +# between Python releases. +self._setup(self._connection_class(host, +port, strict, timeout = REGISTER_TIMEOUT)) + +class TimeoutTransport(xmlrpclib.Transport): +def make_connection(self, host): +host, extra_headers, x509 = self.get_host_info(host) +return TimeoutHTTP(host, timeout = REGISTER_TIMEOUT) + def register_laptop(url=REGISTER_URL): profile = get_profile() @@ -95,10 +111,10 @@ def register_laptop(url=REGISTER_URL): nick = client.get_string('/desktop/sugar/user/nick') -server = ServerProxy(url) +server = xmlrpclib.ServerProxy(url, TimeoutTransport()) try: data = server.register(sn, nick, uuid_, profile.pubkey) -except (Error, socket.error): +except (xmlrpclib.Error, socket.error): logging.exception('Registration: cannot connect to server') raise RegisterError(_('Cannot connect to the server.')) -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] Time out on registration process to prevent indefinite UI hang (SL#2289)
Registration with the school server is currently done synchronously. To prevent the UI from hanging indefinitely, if the school server is reachable but unresponsive, we add an explicit timeout. --- src/jarabe/desktop/schoolserver.py | 20 +--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index 62519df..98ad7e7 100644 --- a/src/jarabe/desktop/schoolserver.py +++ b/src/jarabe/desktop/schoolserver.py @@ -16,7 +16,8 @@ import logging from gettext import gettext as _ -from xmlrpclib import ServerProxy, Error +import httplib +import xmlrpclib import socket import os import string @@ -30,6 +31,7 @@ from sugar import env from sugar.profile import get_profile REGISTER_URL = 'http://schoolserver:8080/' +REGISTER_TIMEOUT = 8 def generate_serial_number(): Generates a serial number based on 3 random uppercase letters @@ -76,6 +78,18 @@ def store_identifiers(serial_number, uuid, backup_url): class RegisterError(Exception): pass +class TimeoutHTTP(httplib.HTTP): +def __init__(self, host='', port=None, strict=None, timeout = None): +if port == 0: +port = None +self._setup(self._connection_class(host, +port, strict, timeout = REGISTER_TIMEOUT)) + +class TimeoutTransport(xmlrpclib.Transport): +def make_connection(self, host): +host, extra_headers, x509 = self.get_host_info(host) +return TimeoutHTTP(host, timeout = REGISTER_TIMEOUT) + def register_laptop(url=REGISTER_URL): profile = get_profile() @@ -95,10 +109,10 @@ def register_laptop(url=REGISTER_URL): nick = client.get_string('/desktop/sugar/user/nick') -server = ServerProxy(url) +server = xmlrpclib.ServerProxy(url, TimeoutTransport()) try: data = server.register(sn, nick, uuid_, profile.pubkey) -except (Error, socket.error): +except (xmlrpclib.Error, socket.error): logging.exception('Registration: cannot connect to server') raise RegisterError(_('Cannot connect to the server.')) -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Patch Review for SL #2289
Hi Sascha, Thank you for reviewing the patch. Highly appreciate your feedback and support. Yes, I made a mistake in my last patch, and didn't test it. My apologies for sending the patch for review before testing it locally. I have revised the patch , and sent it for review again. Please let me know if any further improvements are required. Will be happy to do so. Thanks again. Regards, Dipankar ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] Time out on registration process to prevent indefinite UI hang (SL#2289)
Registration with the school server is currently done synchronously. To prevent the UI from hanging indefinitely, if the school server is reachable but unresponsive, we add an explicit timeout. --- src/jarabe/desktop/schoolserver.py | 19 --- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index 62519df..6a96077 100644 --- a/src/jarabe/desktop/schoolserver.py +++ b/src/jarabe/desktop/schoolserver.py @@ -16,7 +16,8 @@ import logging from gettext import gettext as _ -from xmlrpclib import ServerProxy, Error +import httplib +import xmlrpclib import socket import os import string @@ -30,6 +31,7 @@ from sugar import env from sugar.profile import get_profile REGISTER_URL = 'http://schoolserver:8080/' +REGISTER_TIMEOUT = 10 def generate_serial_number(): Generates a serial number based on 3 random uppercase letters @@ -76,6 +78,17 @@ def store_identifiers(serial_number, uuid, backup_url): class RegisterError(Exception): pass +class TimeoutHTTP(httplib.HTTP): + def __init__(self, host='', port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): +if port == 0: +port = None +self._setup(self._connection_class(host, port, strict, timeout)) + +class TimeoutTransport(xmlrpclib.Transport): + def make_connection(self, host): +host, extra_headers, x509 = self.get_host_info(host) +return TimeoutHTTP(host, timeout = REGISTER_TIMEOUT) + def register_laptop(url=REGISTER_URL): profile = get_profile() @@ -95,10 +108,10 @@ def register_laptop(url=REGISTER_URL): nick = client.get_string('/desktop/sugar/user/nick') -server = ServerProxy(url) +server = xmlrpclib.ServerProxy(url, TimeoutTransport()) try: data = server.register(sn, nick, uuid_, profile.pubkey) -except (Error, socket.error): +except (xmlrpclib.Error, socket.error): logging.exception('Registration: cannot connect to server') raise RegisterError(_('Cannot connect to the server.')) -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Patch review request for ticket #2290
Sorry for that duplicate bug. Missed out that lfaraone already filed the bug. I have attached the revised patch. (uploaded at bugs.sl.o too) * changed things (subject, description, etc) according to Sascha Silbe's suggestions. @ Marco : The default timeout is way too long (unable to find out exact time). Yes, the process is synchronous, thats why Sugar is freezing. @ Tomeu: Thanks for the review. Will try to get the registration process asynchronous. Regards, Dipankar On Mon, Sep 6, 2010 at 4:12 PM, Tomeu Vizoso to...@sugarlabs.org wrote: On Mon, Sep 6, 2010 at 11:51, Marco Pesenti Gritti ma...@marcopg.org wrote: On Sun, Sep 5, 2010 at 3:44 PM, Dipankar Patro dipan...@seeta.in wrote: Hi, In reference to ticket #2290 (http://bugs.sugarlabs.org/ticket/2290) I have uploaded a patch (have attached it too). Problem: in the register procedure the time out of connection was not implemented, for an unavailable server. Solution in Patch: - Have implemented a TimedOut connection (TimedOutServerProxy( ) function) which encounters the problem of unavailable servers. - The connection timeout can be changed in seconds through the variable : 'timeout'. The default setting is at : timeout=socket._GLOBAL_DEFAULT_TIMEOUT Change it to : timeout=10, to find Sugar does not freeze anymore. How long is the default timeout? Are we freezing because we are doing the xmlrpc requests synchronously? Previous discussion is actually in http://bugs.sugarlabs.org/ticket/2289 and not in #2290. Looks like we cannot do XML-RPC with GIO because it doesn't support POST for http requests. The right component in our stack would be libsoup but we find again that we need introspection to use it because nobody cared to write, maintain and package python bindings for it. This makes xmlrpclib usage async, but it also uses private API: http://www.mail-archive.com/py...@daa.com.au/msg12971.html So maybe the best we can do for now is indeed setting a timeout. Regards, Tomeu Marco ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel From a2cf4863eca617bcd57008730e13ab8af95e7cfa Mon Sep 17 00:00:00 2001 From: Dipankar Patro dipan...@seeta.in Date: Mon, 6 Sep 2010 21:42:51 +0530 Subject: [PATCH] Register widget click event reflects a timeout on unavailability of servers [Ticket #2289] The register widget when clicked, used to cause sugar to freeze. Added a timeout facilitated ServerProxy() so that connection to schoolserver is dropped in case it is not available. --- src/jarabe/desktop/schoolserver.py | 28 ++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index 62519df..e60e26f 100644 --- a/src/jarabe/desktop/schoolserver.py +++ b/src/jarabe/desktop/schoolserver.py @@ -16,7 +16,8 @@ import logging from gettext import gettext as _ -from xmlrpclib import ServerProxy, Error +import httplib +import xmlrpclib import socket import os import string @@ -76,6 +77,29 @@ def store_identifiers(serial_number, uuid, backup_url): class RegisterError(Exception): pass +class TimeoutHTTP(httplib.HTTP): + def __init__(self, host='', port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): +if port == 0: +port = None +self._setup(self._connection_class(host, port, strict, timeout)) + +class TimeoutTransport(xmlrpclib.Transport): +def __init__(self, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, *args, **kwargs): +xmlrpclib.Transport.__init__(self, *args, **kwargs) +self.timeout = timeout + +def make_connection(self, host): +host, extra_headers, x509 = self.get_host_info(host) +return TimeoutHTTP(host, timeout=self.timeout) + +class TimeoutServerProxy(xmlrpclib.ServerProxy): + Creates a server proxy with Timeout facility. + Timeout sent in argument can be used to drop connection + for unavailable servers +def __init__(self, url, timeout, *args, **kwargs): +kwargs['transport'] = TimeoutTransport(timeout=timeout, use_datetime=kwargs.get('use_datetime', 0)) +xmlrpclib.ServerProxy.__init__(self, url, *args, **kwargs) + def register_laptop(url=REGISTER_URL): profile = get_profile() @@ -95,7 +119,7 @@ def register_laptop(url=REGISTER_URL): nick = client.get_string('/desktop/sugar/user/nick') -server = ServerProxy(url) +server = TimeoutServerProxy(url,10) try: data = server.register(sn, nick, uuid_, profile.pubkey) except (Error, socket.error): -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Patch review request for ticket #2290
Hi, In reference to ticket #2290 (http://bugs.sugarlabs.org/ticket/2290) I have uploaded a patch (have attached it too). Problem: in the register procedure the time out of connection was not implemented, for an unavailable server. Solution in Patch: - Have implemented a TimedOut connection (TimedOutServerProxy( ) function) which encounters the problem of unavailable servers. - The connection timeout can be changed in seconds through the variable : 'timeout'. The default setting is at : timeout=socket._GLOBAL_DEFAULT_TIMEOUT Change it to : timeout=10, to find Sugar does not freeze anymore. Regards, Dipankar From e636b25da0973e9986b6fcd2a7f0f5a48d3e0265 Mon Sep 17 00:00:00 2001 From: Dipankar Patro dipan...@seeta.in Date: Sat, 4 Sep 2010 19:53:54 +0530 Subject: [PATCH] Register Bug Solution: ticket #2290 --- src/jarabe/desktop/schoolserver.py | 40 ++- 1 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index 62519df..58ffb88 100644 --- a/src/jarabe/desktop/schoolserver.py +++ b/src/jarabe/desktop/schoolserver.py @@ -16,10 +16,12 @@ import logging from gettext import gettext as _ -from xmlrpclib import ServerProxy, Error + +import httplib +import xmlrpclib import socket import os -import string +from string import ascii_uppercase import random import time import uuid @@ -37,8 +39,8 @@ def generate_serial_number(): serial_part1 = [] -for y in range(3) : -serial_part1.append(random.choice(string.ascii_uppercase)) +for y_ in range(3) : +serial_part1.append(random.choice(ascii_uppercase)) serial_part1 = ''.join(serial_part1) serial_part2 = str(int(time.time()))[-8:] @@ -76,6 +78,30 @@ def store_identifiers(serial_number, uuid, backup_url): class RegisterError(Exception): pass +# New class TimeoutServerProxy to implement timeout controlled connection, derived from xmlrpclib.ServerProxy() +# LP Bug #617813 +class TimeoutHTTP(httplib.HTTP): + def __init__(self, host='', port=None, strict=None, +timeout=socket._GLOBAL_DEFAULT_TIMEOUT): +if port == 0: +port = None +self._setup(self._connection_class(host, port, strict, timeout)) + +class TimeoutTransport(xmlrpclib.Transport): +def __init__(self, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, *args, **kwargs): +xmlrpclib.Transport.__init__(self, *args, **kwargs) +self.timeout = timeout + +def make_connection(self, host): +host, extra_headers, x509 = self.get_host_info(host) +conn = TimeoutHTTP(host, timeout=self.timeout) +return conn + +class TimeoutServerProxy(xmlrpclib.ServerProxy): +def __init__(self, url, timeout, *args, **kwargs): +kwargs['transport'] = TimeoutTransport(timeout=timeout, use_datetime=kwargs.get('use_datetime', 0)) +xmlrpclib.ServerProxy.__init__(self, url, *args, **kwargs) + def register_laptop(url=REGISTER_URL): profile = get_profile() @@ -89,13 +115,15 @@ def register_laptop(url=REGISTER_URL): else: sn = generate_serial_number() uuid_ = str(uuid.uuid1()) -jabber_server = client.get_string('/desktop/sugar/collaboration/jabber_server') +setting_name = '/desktop/sugar/collaboration/jabber_server' +jabber_server = client.get_string(setting_name) store_identifiers(sn, uuid_, jabber_server) url = 'http://' + jabber_server + ':8080/' nick = client.get_string('/desktop/sugar/user/nick') -server = ServerProxy(url) +server = TimeoutServerProxy(url) + try: data = server.register(sn, nick, uuid_, profile.pubkey) except (Error, socket.error): -- 1.7.0.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Alt + Tab issue on sugar-emulator
Hi all, I am working on the bug: http://bugs.sugarlabs.org/ticket/1520 I was unable to reproduce the bug because the 'Alt + Tab' function doesn't work in Sugar on Ubuntu (Neither in emulator nor in Sugar-Session). I had a discussion on this with Aleksey Lim. He suggested using the command in Sugar-session 'metacity-message disable-keybindings' and then try the combination 'Alt+Tab'. But unfortunately that also did not work out. (No pop-up came) The problem with sugar-emulator: Somehow the native X sessions' priority is higher then Xephyr's. So even if the function for 'Alt+Tab' is coded into Sugar. The emulator (on Xephyr) still won't be able to catch that. Aleksey suggested we have to disable the 'Alt+Tab' combination in Sugar-Emulator. It would be great to have some views and pointers on the above situation. Is there any way we can implement the 'Alt + Tab' in Xephyr too? Regards, Dipankar ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel