Features vs. Preferences
As most people know, there has been some flamewars accusing Gnome developers of removing options for the benefit of "idiot users". I've definitely been responsible for removing preferences from some parts of the desktop in the past. Probably the most dramatic is the drive mount applet, which started off with a preferences dialog with the following options:
- Mount point: which mount point should the icon watch the state of?
- Update interval: at what frequency should the mount point be polled to check its status?
- Icon: what icon should be used to represent this mount point. A selection of various drive type icons were provided for things like CDs, Floppys, Zip disks, etc.
- Mounted Icon and Unmounted Icon: if "custom" was selected for the above, let the user pick custom image files to display the two states.
- Eject disk when unmounted: whether to attempt to eject the disk when the unmount command is issued.
- Use automount-friendly status test: whether to use a status check that wouldn't cause an automounter to mount the volume in question.
These options (and the applet in general) survived pretty much intact from the Gnome 1.x days. However the rest of Gnome (and the way people use computers in general) had moved forward since then, so it seemed sensible to rethink the preferences provided by the applet:
Double the Fist
The excellent show Double the Fist is being rerun on ABC on Thursday nights at 11:15pm.
Even though the show won an AFI award last year, it was pretty easy to miss because it was initially shown on ABC 2 (the digital-only channel, which only a fraction of the population can tune into) and then late at night on the main channel.
I've been wanting to see the rest of the series ever since catching it part way through when it was shown last.
Re: Pixmap Memory Usage
Glynn: I suspect that the Pixmap memory usage has something to do with image rendering rather than applets in particular doing something stupid. Notice that most other GTK programs seem to be using similar amounts of pixmap memory.
To help test this hypothesis, I used the following Python program:
import gobject, gtk
win = gtk.Window()
win.set_title('Test')
win.connect('destroy', lambda w: gtk.main_quit())
def add_image():
img = gtk.image_new_from_stock(gtk.STOCK_CLOSE,
gtk.ICON_SIZE_BUTTON)
win.add(img)
img.show()
gobject.timeout_add(30000, add_image)
win.show()
gtk.main()
According to xrestop
, this program has low pixmap memory usage when
it starts, but jumps up to similar levels to the other apps after 30
seconds.
Switch users from XScreenSaver
Joao: you can
configure XScreenSaver to show a "Switch User" button in it's
password dialog (which calls gdmflexiserver
when run). This lets you
start a new X session after the screen has locked. This feature is
turned on in Ubuntu if you want to try it out.
Of course, this is not a full solution, since it doesn't help you switch to an existing session (you'd need to guess the correct Ctrl+Alt+Fn combo). There is code in gnome-screensaver to support this though, giving you a list of sessions you can switch to.
OpenSSH support in bzr
I updated my bzr openssh plugin to be a
proper patch against bzr.dev
, and got it merged. So if you have
bzr-openssh-sftp.py
in your ~/.bazaar/plugins
directory, you
should remove it when upgrading.
Unfortunately there was a small problem resolving a conflict when
merging it, which causes the path to get mangled a little inside
_sftp_connect()
. Once this is resolved, the mainline bzr
should
fully follow settings in ~/.ssh/config
, because it will be running the
same ssh binary as you normally use.
PSP
On my way to UBZ, I bought a PlayStation Portable at the airport duty free store. It was being sold as the value pack and Ridge Racer game together, which came out at roughly the retail price of the two individual items minus 10% GST.
As well as playing games it can be used as a portable audio or video
player and photo viewer, using memory stick duos as storage. As the
device doesn't come with any computer software, the manual provides all
the details about what formats to use for audio/video and where to put
the files on the memory stick. This is quite useful for people using
minority operating systems like Linux :)
.
Using OpenSSH with bzr
One of the transports available in
bzr
is sftp
. This is
implemented using the Paramiko SSH and
SFTP library. Unfortunately there are a few issues I experienced with
the code:
- Since it is an independent implementation of SSH, none of my OpenSSH
settings in
~/.ssh/config
were recognised. The particular options I rely on include:User
: when the remote username doesn't match my local one. One less thing to remember when connecting to a remote machine.IdentityFile
: use different keys to access different machines.ProxyCommand
: access work machines that are behind the firewall.
- Paramiko does not currently support SSH compression. This is a real pain for larger trees.
The easiest way to fix all these problems would be to use OpenSSH
directly, so wrote a small plugin to do so. I decided to follow the
model used to do this in gnome-vfs
and Bazaar 1.x: communicate with an
ssh
subprocess via pipes and implement the SFTP protocol internally.
Moving from Bugzilla to Launchpad
One of the things that was discussed at
UBZ was moving Ubuntu's bug
tracking over to Launchpad. The current
situation sees bugs in main
being filed in
bugzilla while bugs in universe
go in
Launchpad. Putting all the bugs in Launchpad is an improvement, since
users only need to go to one system to file bugs.
I wrote the majority of the conversion script before the conference, but made a few important improvements at the conference after discussions with some of the developers. Since the bug tracking system is probably of interest to people who weren't at the conf, I'll outline some of the details of the conversion below:
Avahi on Breezy followup
So after I posted some instructions for setting up Avahi on Breezy, a fair number of people at UBZ did so. For most people this worked fine, but it seems that a few people's systems started spewing a lot of network traffic.
It turns out that the problem was actually caused by the
zeroconf
package
(which I did not suggest installing) rather than Avahi. The zeroconf
package is not needed for service discovery or .local
name lookup, so
if you are at UBZ you should remove the package or suffer the wrath of
Elmo.
Avahi on Breezy
During conferences, it is often useful to be able to connect to connect to other people's machines (e.g. for collaborative editing sessions with Gobby). This is a place where mDNS hostname resolution can come in handy, so you don't need to remember IP addresses.
This is quite easy to set up on Breezy:
- Install the
avahi-daemon
,avahi-utils
andlibnss-mdns
packages from universe. - Restart dbus in order for the new system bus security policies to
take effect with "
sudo invoke-rc.d dbus restart
". - Start
avahi-daemon
with "sudo invoke-rc.d avahi-daemon start
". - Edit
/etc/nsswitch.conf
, and add "mdns
" to the end of the "hosts:
" line.
Now your hostname should be advertised to the local network, and you can
connect to other hosts by name (of the form hostname.local
). You can
also get a list of the currently advertised hosts and services with the
avahi-discover
program.
Ubuntu Below Zero
I've been in Montreal since Wednesday for Ubuntu Below Zero.
As well as being my first time in Canada, it was my first time in transit through the USA. Unlike in most countries, I needed to pass through customs and get a visa waiver even though I was in transit. The visa waiver form had some pretty weird questions, such as whether I was involved in persecutions associated with Nazi Germany or its allies.
DSB-R100 USB Radio Tuner
Picked up a DSB-R100 USB Radio tuner off EBay recently. I did this partly because I have better speakers on my computer than on the radio in that room, and partly because I wanted to play around with timed recordings.
Setting it up was trivial -- the dsbr100
driver got loaded
automatically, and a program to tune the radio
(gnomeradio) was
available in the Ubuntu universe repository. I did need to change the
radio device from /dev/radio
to /dev/radio0
though.
License Proliferation
Glynn: you say that the CDDL is just an attempt to stop the proliferation of software licenses, yet the end result appears to be yet another license.
I realise that many of the changes in the CDDL with respect to the MPL make sense (e.g. not fixing choice of legal jurisdiction into the license), but it is still another license for people to digest.
Of course, this complaint would be invalidated if many of the projects using the MPL or one of its variants switched to the CDDL instead. Has Sun approached anyone about doing so? (e.g. Mozilla, Cairo, etc).
Playing with Google Maps API
I finally got round to playing with the Google Maps API, and the results can be seen here. I took data from the GnomeWorldWide wiki page and merged in some information from the Planet Gnome FOAF file (which now includes the nicknames and hackergotchis).
The code is available here (a BZR branch, but you can easily download the latest versions of the files directly). The code works roughly as follows:
Python class advisors
Anyone who has played with Zope 3 has probably seen the syntax used to declare what interfaces a particular class implements. It looks something like this:
class Foo:
implements(IFoo, IBar)
...
This leads to the following question: how can a function call inside a class definition's scope affect the resulting class? To understand how this works, a little knowledge of Python metaclasses is needed.
Metaclasses
In Python, classes are instances of metaclasses. For new-style
classes, the default metaclass is type
(which happens to be its own
metaclass). When you create a new class or subclass, you are creating
a new instance of the metaclass. The constructor for a metaclass takes
three arguments: the class's name, a tuple of the base classes and a
dictionary attributes and methods. So the following two definitions of
the class C
are equivalent:
Comparison of Configs/Aliases in Bazaar, CVS and Subversion
When a project grows to a certain size, it will probably need a way to
share code between multiple software packages they release. In the
context of Gnome, one example is the sharing of the libbackground
code
between Nautilus and gnome-control-center. The simplest way to do this
is to just copy over the files in question and manually synchronise
them. This is a pain to do, and can lead to problems if changes are made
to both copies, so you'd want to avoid it if possible. So most version
control systems provide some way to share code in this way. As with the
previous articles, I'll focus on Bazaar, CVS and Subversion
End Of Fashion
I went to see End of Fashion upstairs at 78s today for their in-store appearance. The tickets were included with the band's single which was pretty nice.
They played for about 40 minutes, starting off with some of their well known songs, and then mixed in a few of the new ones off the album. Towards the end, they did a cover of The Red Sun Band's "Devil Song".
After the set the band were doing autographs, so I got the liner notes from my copy of the new album signed by all the band members. I like what I've listened to on the album so far.
Version control discussion on the Python list
The Python developers have been discussing a migration off CVS on the python-dev mailing list. During the discussion, Bazaar-NG was mentioned. A few posts of note:
- Mark Shuttleworth provides some information on the Bazaar roadmap. Importantly, Bazaar-NG will become Bazaar 2.0.
- Steve Alexander describes how we use Bazaar to develop Launchpad. This includes a description of the branch review process we use to integrate changes into the mainline.
I'm going to have to play around with bzr
a bit more, but it looks
very nice (and should require less typing than baz
...)
Version Control Workflow
Havoc: we are looking at ways to better integrate version control in Launchpad. There are many areas that could benefit from better use of version control, but I'll focus on bug tracking since you mentioned it.
Take the attachment handling in Bugzilla, for instance. In non-ancient versions, you can attach statuses to attachments such as "obsolete" (which has some special handling in the UI — striking out obsolete attachments and making it easy to mark attachments as obsolete when uploading a new attachment). This makes it easy to track and manage a sequence of patches as a fix for a bug is developed (bug 118372 is a metacity bug with such a chain of patches).
Back from Brazil
I got back from the Launchpad sprint in São Carlos on Tuesday afternoon. It was hard work, but a lot of work got done. Launchpad is really coming together now, and will become even better as some of the things discussed at the sprint get implemented.
One of the things discussed was to formalise some of the development workflow we've been using to develop Launchpad inside Launchpad itself so that it will be usable by other projects.
Google Maps API + GnomeWorldWide?
I was looking at the Google Maps API documentation, and had an idea: combine it with the data from GnomeWorldWide, and you could have a nice zoomable map, and provide extra info when clicking on the marker (name, location, hackergotchi, etc).
I might take a look at this when I get some time (probably after getting back from Brazil).
Comments:
Pierre -
We've done something similar at Ubuntu-fr.org but we update the xml file by hand thaks to the wiki
HTTP resource watcher
I've got most of the features of my HTTP resource watching code I was working on for GWeather done. The main benefits over the existing gnome-vfs based code are:
- Simpler API. Just connect to the
updated
signal on the resource object, and you get notified when the resource changes. - Supports
gzip
anddeflate
content encodings, to reduce bandwidth usage. - Keeps track of
Last-Modified
date andEtag
value for the resource so that it can do conditionalGET
s of the resource for simple client side caching. - Supports the
Expires
header. If the update interval is set at 30 minutes but the web server says that the it won't be updated for an hour, then use the longer timeout til the next check. - If a permanent redirect is received, then the new URI is used for future checks.
- If a
410 Gone
response is received, then future checks are not queued (they can be restarted with arefresh()
call).
I've also got some code to watch the HTTP proxy settings in GConf, but that seems to trigger a hang in libsoup (bug 309867).
Going to Brazil
On Sunday I will be going to be travelling to São Carlos, Brazil for two weeks of the Launchpad sprint. It will be my first time travelling to either Brazil or South America so should be fun. That leaves just North America as the only major continent I haven't visited.
Comments:
xaccrocheur -
I'm a little disappointed, I was expecting a "going to brazil" tutorial, how to get there, why, see also, these sort of things. Thank you anyway
Bryan's Bazaar Tutorial
Bryan: there are a number of steps you can skip in your little tutorial:
-
You don't need to set
my-default-archive
. If you often work with multiple archives, you can treat working copies for all archives pretty much the same. If you are currently inside a working copy, any branch names you use will be relative to your current one, so you can still use short branch names in almost all cases (this is similar to the reason I don't set$CVSROOT
when working with CVS).