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)
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. 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? 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. Sascha, I agree with you, there should be ready-made Live CD kind of thing for XS. Just plug and test! :-) The current installation CD is supposed to perform an almost 100% automated installation. -- // Bernie Innocenti - http://codewiz.org/ \X/ Sugar Labs - http://sugarlabs.org/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)
On Sat, 2010-10-02 at 10:22 +0200, Sascha Silbe wrote: We also have jabber-testing.sugarlabs.org which was intended to be our new collaboration server, but nobody setup jabber on it yet. Dave, would you have time to work on it? Bine showed some interest in working on it, but we won't have time until mid/end-october. Then I will destroy the jabber-testing vm to conserve resources. Besides, jabber does not have to run on a special VM... It could be on sunjammer or on jita. -- // Bernie Innocenti - http://codewiz.org/ \X/ Sugar Labs - http://sugarlabs.org/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)
Excerpts from Bernie Innocenti's message of Sat Oct 02 00:03:35 +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. We already have one: schoolserver.sugarlabs.org. Unfortunately, the schoolserver 0.6 is an old F-9. That's a VM instance running on our servers. What I meant was a ready-to-run VM image that anybody wanting to test against a school server could just run locally. We also have jabber-testing.sugarlabs.org which was intended to be our new collaboration server, but nobody setup jabber on it yet. Dave, would you have time to work on it? Bine showed some interest in working on it, but we won't have time until mid/end-october. Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature ___ 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)
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/ signature.asc Description: PGP signature ___ 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] Replacing Illegal character ':' in username (SL #2152)
On Fri, Oct 1, 2010 at 3:00 PM, Dipankar Patro dipan...@seeta.in wrote: I am following this site for XS installation: I thought you already had an XS. You have the right URLs but installing an XS for this will be too much work. As Bernie suggested, just install idmgr on a fedora box. 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] Replacing Illegal character ':' in username (SL #2152)
On Thu, 2010-09-30 at 18:48 +0200, Sascha Silbe 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. We already have one: schoolserver.sugarlabs.org. Unfortunately, the schoolserver 0.6 is an old F-9. We also have jabber-testing.sugarlabs.org which was intended to be our new collaboration server, but nobody setup jabber on it yet. Dave, would you have time to work on it? For reference: That's #1976 [1]. Tim already provided a patch several months ago, but it needs some minor polishing. [2] Yes, in particular: http://lists.sugarlabs.org/archive/sugar-devel/2010-July/025739.html Dipankar, could you work on this when you're done with sl#2152? -- // Bernie Innocenti - http://codewiz.org/ \X/ Sugar Labs - http://sugarlabs.org/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)
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
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
Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)
Hi Dipankar, the XS will use the serial number provided by Sugar as the 'username'. The nickname is used to set the GECOS information. Background info -- what's the GECOS? It's where you normally wrte your full name. So on my laptop, my username is 'martin', my GECOS is Martin Langhoff. $ grep martin /etc/passwd martin:x:1000:1000:Martin Langhoff,,,:/home/martin:/bin/bash For the test process, I am asking that you - run the failing test case - monitor the XMLRPC traffic -- is the XMLRPC msg sent valid? - monitor the idmgr daemon for errors -- is idmgr complaining about anything? cheers, martin -- martin.langh...@gmail.com mar...@laptop.org -- School Server Architect - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ 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)
On 09/30/10 17:14, Dipankar Patro wrote: 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? In the absense of a real test schoolserver, perhaps you could install the rpm package idmgr. It's not in Fedora, I think the rpm binary can be found somewhere on http://xs-dev.laptop.org/ When you have idmgr running on your computer, you'd have to convince your laptop to go query your machine. You can do this in two ways: 1) by hijacking the dns to make schoolserver point at your IP; or 2) by changing the schoolserver hostname in Sugar's code (I think it's in schoolserver.py) 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. * 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? I think so, but Martin probably knows better. * 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). Yes, your fix would work, but: 1) you missed the other name selection box in the firstboot screen; and 2) perhaps you can find a way to filter the input of the gtk Entry widget instead of silently changing the input after the fact. 3) if option (2) fails, rather than a full-blown regex you could use str.replace(), which is simpler and cheaper. 3rd one, I have no clue :P Wish you could help me with above. This is server-side, in package idmgr :-) -- // Bernie Innocenti - http://codewiz.org/ \X/ Sugar Labs - http://sugarlabs.org/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)
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/ signature.asc Description: PGP signature ___ 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)
Excerpts from Dipankar Patro's message of Wed Sep 29 19:32:22 +0200 2010: @@ -42,6 +43,7 @@ def set_nick(nick): if not nick: raise ValueError(_(You must enter a name.)) if not isinstance(nick, unicode): +nick = re.sub(r':', '_', nick) nick = unicode(nick, 'utf-8') client = gconf.client_get_default() client.set_string(/desktop/sugar/user/nick, nick) This would change the user-set (and user-visible) name. We should avoid to do that unless we have a very good reason. Instead it should be coped with at the lower-level place that breaks, i.e. in the code interacting with the school server. Not sure exactly which file that is, maybe someone else can give a better hint. Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature ___ 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)
On 30 September 2010 06:32, Dipankar Patro dipan...@seeta.in wrote: Hi, With reference to bug : http://bugs.sugarlabs.org/ticket/2152 I am trying to replace the ':' character in the username with '_', while the user is entering the Username in About Me. The following has been done by me so far: - diff --git a/extensions/cpsection/aboutme/model.py b/extensions/cpsection/aboutme/model.py index 8500799..47e7158 100644 --- a/extensions/cpsection/aboutme/model.py +++ b/extensions/cpsection/aboutme/model.py @@ -17,6 +17,7 @@ from gettext import gettext as _ import gconf +import re _COLORS = {'red': {'dark':'#b20008', 'medium':'#e6000a', 'light':'#ffadce'}, 'orange': {'dark':'#9a5200', 'medium':'#c97e00', 'light':'#ffc169'}, @@ -42,6 +43,7 @@ def set_nick(nick): if not nick: raise ValueError(_(You must enter a name.)) if not isinstance(nick, unicode): +nick = re.sub(r':', '_', nick) nick = unicode(nick, 'utf-8') client = gconf.client_get_default() client.set_string(/desktop/sugar/user/nick, nick) I would use simple string operations rather than regular expressions. Also, take it out of the type checking block. Unicode expressions may still contain :. Looking at this, I would also change the first conditional to something that emulates a try/except block. if nick: nick = unicode(nick.replace(':', '_'), encoding='utf-8') client = gconf.client_get_default() client.set_string(/desktop/sugar/user/nick, nick) else: raise ValueError(_(You must enter a name.)) I see no added advantage in type testing for unicode. Unicode instances will incur no further penalty than what would have occurred anyway with type testing. Like Sascha, I don't know where to implement the name change. Tim ___ 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)
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. I strongly recommend that you focus on digging for more info on where the bug triggers - is the registration code on the sugar side building an invalid xmlrpm msg? - is the registration code on the XS side not escaping the nickname? - is the problem somewhere else? If the problem is in any of the 2 spots I mention, then the ':' character is the least of our worries ;-) 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