[Sugar-devel] Replacing Illegal character ':' in username (SL #2152)

Bernie Innocenti bernie at codewiz.org
Thu Sep 30 11:42:17 EDT 2010


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/


More information about the Sugar-devel mailing list