User:Tdang: Difference between revisions
No edit summary |
No edit summary |
||
Line 107: | Line 107: | ||
# new clock code here |
# new clock code here |
||
clock = FrameClock("%a %b %d %I:%M %p") # Show day month date HH:MM AM/PM |
clock = FrameClock("%a %b %d %I:%M %p") # Show day month date HH:MM AM/PM |
||
# clock = FrameClock("%D %H:%M:%S") # show date & time through seconds |
# clock = FrameClock("%D %H:%M:%S") # show date & time through seconds |
||
# self.insert(clock,0) # Put clock to left of navigation buttons |
# self.insert(clock,0) # Put clock to left of navigation buttons |
||
self.insert(clock,-1) # Put clock to right of navigation buttons |
self.insert(clock,-1) # Put clock to right of navigation buttons |
||
clock.show() |
clock.show() |
Revision as of 08:51, 30 March 2008
I hope for this page to be helpful to me and others. You're others, and I hope it will be helpful to you by answering some basic setup questions which it seems everyone has. I'm going to stick to my own setup, though, so it will be most helpful if you like things the way I do.
I'm me, so I hope this page will help me remember where I'm at in my messing around with my XO.
All advice given here is given with lots of caveats. The main one is that I'm working from my faulty memory about some of these things.
Overall System
I'm sticking to the standard system, using the standard Fedora OS, and Sugar. I'm using the current stable build, which is 656 right now.
As much as it seems reasonable to me, I'm also sticking to Sugar activities rather than branching out to novel applications. I hope that by doing so I can be part of making the standard system successful. There are exceptions where I use other software, which I'll describe.
I'm a G1G1 guy, gave three and got three, two of which are still in my home, which is in Arizona. So, everything here will kinda inevitably be targeted at G1G1 folks in the United States.
Knowledge Level
I'm not a novice or proficient. My XO is the first Linux machine I've ever been intimate with. I have been a professional programmer, but I've always hated system administration.
I'm going to assume that if you're looking for advice from my page, you're somewhere nearish to my skill level. You need to be willing to modify code in a text editor, but I'll try not to throw anything crazy at you.
Community
You'll want to be in touch with other XO users. For me, the best online community seems to be the OLPCNews forum
You should also ee if there is a local.
I haven't done so myself, but if you're able (probably after you've gotten your XO all configured) you might want to hook up with a Community Jabber Server.
Of course, related: If this XO is for a kid, you'll want to think hard about online safety. A wiki can't provide complete guidance on this, since it depends on you and the kid and how the computer is used... But there is some discussion at Online threats and security.
Brand New XO
OK, you've got an XO. It's smaller than you expected! Damn, it's cute! Argh, I'm supposed to type on this?!
Things to note:
- There's no human-powered charger included. Drat! The argument is that we don't need them as much as kids in rural areas. I have an outlet within reach most of the time.
- The stylus isn't enabled. That wasn't a disappointment for me since I didn't know it was part of the specification before I received it. It's suppposed to be implemented later. When it is, you won't need any special XO-stylus; anything properly pointy should work.
- The trackpad should work fine. It doesn't allow for tap-click, which suits me fine because I've always hated that.
- The Journal is weird. It's probably what takes the most getting-used-to for someone familiar with standard computers. I'll leave the warning at that for the moment. Read the Getting Started Guide for some help. I'll try to give more useful advice when I've figured it out.
- The XO will likely be slower than you expected. Try to not run many programs at one time.
Don't worry too much about the name and colors you select. If you change your mind later, you'll be able to change them.
You might notice the "Register" option in the drop-down menu which has "Reboot" and "Shutdown". Odds are that you should ignore that. Register is only for XO's which are intended to hook up with a school server.
Getting Connected
The XO has no built-in way to plug in to a network by wire. It assumes you can connect wirelessly. If you need to be wired, check out USB_ethernet_adaptors. I haven't tried any of those, so can't offer advice.
If you have an open wifi network available, you're set. Use the advice in the Getting Started Guide to connect.
If you have a secure network at home, you might want to go somewhere (public library or T-Mobile hotspot, or whatever) with an open network so you can do the initial updating stuff first before going through the secure connection rigmarole.
Connecting to Secure Wifi
Update the OS
Update the OS as soon as you reasonably can. This is because when you update the OS, you'll lose pretty much anything you've done with your XO.
Give Browse a Home Page
Tweaking Sugar
You might want to change some of the basic behavior of Sugar. I'll give a couple examples of what I've done.
Pre-Tweaking Precaution
First, however, I strongly recommend a precautionary change. By default, X (the graphical environment Sugar runs in) restarts itself automatically. That means if something goes wrong as Sugar is starting, it quits and dumps out to the console, and then restarts and so on loops and loops and it's very hard to fix.
Michael Stone gave me good advice to prevent this from happening at the forum. Before making any (even minor) tweaks to Sugar, I follow that advice.
Practice Tweak--Background Color
Just to get familiar with making changes to Sugar, and because it's fun to personalize, how about changing the background color of the Home view?
Turn Off Register
Since we're never going to to register our XO's with a school server, we don't need to be reminded regularly. So we might as well take that out. It's a minor point, but it's also a minor edit.
in /usr/share/sugar/shell/view/frame/HomeBox.py
Simply comment out the following lines:
# if not self._profile.is_registered(): # item = gtk.MenuItem(_('Register')) # item.connect('activate', self._register_activate_cb) # palette.menu.append(item) # item.show()
Turn Off Hot Corners
There's at least one thing about the standard Sugar interface which most users want to change. (I think it might change by default in future updates.) The hot corners are very annoying for me, and many others. They also feel unnecessary since you can accomplish the same thing(s) by pressing the special navigation buttons.
Add a Clock to Home View
It's very unusual these days to have any electronic device which doesn't tell you what time it is. There are a couple full-fledged clock activities (clock and random tune alarm clock), but they're overkill for a constant clock.
To add a clock, I create one new file and modify one existing file. Both files are in /usr/share/sugar/shell/view/frame
The existing file which gets modified is zoomtoolbar.py. First, up top in the imports it needs:
from frameclock import FrameClock
Down actually in the code of zoomtoolbar.py:
palette = Palette(_('Activity')) palette.props.invoker = FrameWidgetInvoker(button) palette.set_group_id('frame') button.set_palette(palette)
# new clock code here clock = FrameClock("%a %b %d %I:%M %p") # Show day month date HH:MM AM/PM # clock = FrameClock("%D %H:%M:%S") # show date & time through seconds # self.insert(clock,0) # Put clock to left of navigation buttons self.insert(clock,-1) # Put clock to right of navigation buttons clock.show() clock.start()
You see above that there are format choices. You can use time format codes in the call to FrameClock() to get the format you like. And you can decide when you do insert(clock...) whether you want the clock on the left or the right of the navigation buttons.
This requires a definition of FrameClock, which happens in the new file, frameclock.py:
# frameclock -- a little digital clock widget for the Home frame # Actually, there's nothing about this specific to that use, could # be used as a widget anywhere. # March 28, 2008 Timothy Dang from gettext import gettext as _ import gtk import time import gobject import string import pango class FrameClock(gtk.ToolItem): def __init__(self,new_format="%D %H:%M:%S"): gtk.ToolItem.__init__(self) self.set_expand(True) self.format=new_format self.update_interval = 1000 # update every second (recommended)
def start(self): self.label = gtk.Label(time.strftime(self.format)) self.add(self.label) self.label.show() self.update_timer = gobject.timeout_add(self.update_interval,self.update)
def update(self): time_string = time.strftime(self.format) self.label.set_markup(""+time_string+"") self.label.show() return 1 # This seems to be needed to continue the update_timer
That should give you something which looks like:
Linux & Command-Line Tips
Tab-Complete
Editors--nano
Software
Sugar Activities
You can find a bunch of activities on the Activities page here on the wiki.
The simplest way I've found to add new activities is really simple. Use Browse rather than any other browser. Click on a link to a *.xo file. You will see in the upper-right-hand corner a countdown as the activity downloads. After it's downloaded, you'll be able to select "OK" or "Open". Choose "Open". That won't run the activity--it will install the activity. It will then appear on the activity bar at the bottom of the Home view.
Oddly, right after you download and install an activity, it will appear as the last thing on the far right of the activity bar. The next time you start up the XO, it will probably appear in a different order.
Using Browse
Browse is likely the first thing you'll want to replace with a non-Sugar application. It's really not a full-featured browser yet. I still use it a bit, though.
One very confusing bit about Browse is the bookmarks. They aren't bookmarks as you think of them. The main use for them appears to be for sharing links. So, for instance, I can bookmark a page and if you and I are hooked up, you can then see what I've bookmarked. But bookmarks don't survive from one session to another. For remembering places, you'll want to use the Journal.
Accessories
Your XO should be pretty self-contained, since that's part of the idea. I find that I really want two accessories:
- USB stick: This almost goes without saying. A USB stick almost goes without saying these days, but I'll say it anyway. You want one which is at least 1G to be able to do an activated upgrade. I recommend 22G, since that should allow the upgrade and a full XO's worth of backup on one stick.
- USB mouse: I prefer a real mouse over a trackpad with any machine. With the XO, you get extra benefit of having a mouse with a mousewheel-button. That allows copy-and-paste in the Terminal.
Tweaks I want to do
Remove "Register" from menu--Silly really that this isn't done, although it's pretty harmless.
Abort activities which are stuck starting--see thread at forum.
"Delete all" on clipboard