Search Results: "eric"

21 February 2007

Erich Schubert: Sending notifications from Python

I've been using Python to automate some tasks. A common thing with automation is to somehow notify yourself when it's completed. Here's an elegant way to do that in Python (at least for GNOME users):
#!/usr/bin/python
import dbus
sesbus = dbus.SessionBus()
notify_obj = sesbus.get_object('org.freedesktop.Notifications',
                              '/org/freedesktop/Notifications')
notify_if = dbus.Interface(notify_obj, 'org.freedesktop.Notifications')
notify_if.Notify('HelloWorld',0,'','Summary','Body',[], ,-1)
For details, see pydoc dbus and the Notification Daemon API.

Lucas Nussbaum: State of software for Suspend to RAM/Disk ?

Dear readers, I am the mostly happy owner of a Dell Latitude D610 (the one with the ATI video card), running Debian Etch. I installed the hibernate package to try to get Suspend to RAM and to Disk to work, and Suspend to Disk worked out of the box. But Suspend to RAM didn’t work (garbled screen at resume). I never bothered to investigate this until today, when I discovered that acpi-support provides the same functionality, and works both for Suspend to RAM and to Disk ! I’m happier now, but I would like to understand, and the world of ACPI and Suspend to RAM/Disk is very difficult to grasp for newcomers. What is the story behind hibernate and acpi-support ? Why was this duplication of effort needed ? Also, it seems that gnome-power-manager and kpowersave provide the same functionality. Why can’t they just call the relevant acpi-support or hibernate scripts ? How do those different implementations compare (what are their main differences ?) ? Looking at the packages content, it seems that hibernate tries to be generic, while acpi-support gave up, and handles each and every laptop model differently. Correct ? Also, hibernate seems to be handling a few things better, like getting my network interface back up after hibernation. Finally, the last question: how do one debug Suspend issues, when it fails to work ? Is there a document somewhere explaining that ?

20 February 2007

Erich Schubert: Dell customer wishlist

Dell is collecting customer wishes. It's interesting to see that all the top wishes are software related: starting with Linux preinstalled, OpenOffice, no AOL software preinstalled but a plain Vista only, Firefox as default browser or no software installed at all. I'd strongly suggest Dell to consider bundling at least OpenOffice, Firefox, Inkscape, Gaim, Thunderbird, Gimp and some more of the great Opensource software available for Windows (remember: they're free - no extra cost, but some customers will be happy for having a good vector graphics program, or a free office suite...) And I'd definitely like to see Dell offering a "no windows" option; I don't want to pay the Microsoft tax. An OS-less PC is fine for me, but it should be really cheap for Dell to get e.g. Ubuntu preinstalled.

Benjamin Mako Hill: Novartis, Stop It

Swiss pharmaceutical company Novartis is currently suing the Indian government over its patent law in an effort to further limit production of generic drugs in India. Among other drugs, the company is trying to stop India's production of generic AIDS medicines that supplies more than half of the developing world. M decins Sans Fronti res (MSF) has a great FAQ and bunch of other information on their access to essential medicines (AEM) site that you should check out if you are unfamiliar with the case. Mika has been working on a variety of AEM projects for a while with quite a few important successes. From a certain perspective, some of the core calls for access to knowledge share common ground with free software, free culture, and anti software patent advocacy that I've been involved in. Of course, it puts things in perspective to see Mika and others in the AEM community point to millions of people and say that those people will die because of an IP maximilist position. Last week, I went with Mika to a protest of Novartis near MIT. It was just below freezing, slushy, raining, sleeting, and probably the worst weather I've ever experienced in Cambridge. Despite all that, it was wonderful to join a large group of activists in Cambridge/Boston and around the world to send a strong message to Novartis. You can watch a video of the protest or see a set of photographs. Both were taken by my friend Jay.

18 February 2007

David Pashley: Ogg Player Redux

After my last post on music players capable of Ogg Vorbis playback, I was recommended: I can discount the iHP120 straight away as it's a HD based player and will be too large for what I want. Update: I'm intentional avoiding any Apple products. iRiver t10
iRiver T10
90GBP will get me a 2GB device. Several people have claimed it works as USB mass storage, although I've seen someone say American versions wouldn't work. iRiver have a firmware updater to convert it to UMS, so I might need to find a Windows installation. It has good battery life of around 45-50 hours from a single AA battery, which is good. It's got good reviews for its sound quality and its rugged construction might make it good in the gym. Kingston K-PEX100
Kingston K-PEX100
A 2GB model will set me back around 65GBP. It's a touch larger, but thinner than the T10. Looks like a UMS device. It can be expanded with miniSD cards, which seems a nice feature. It only has a 17 hour battery time using the internal rechargable, which seems a bit low, considering my CD player will do 120 hours off two AA. Reviews have mentioned that the build quality is a little budget and a couple of firmware bugs, but hopefully these have been fixed now. Samsung's YP-U2
Samsung YP-U2
Can only find a 1GB unit for 60GBP, although there is a 2GB unit available. Battery life is only 14 hours from the internal rechargable battery. It's smaller than the iRiver T10 and is a UMS device. I've seen reviews complain about the audio quality of this device. I think the lack of battery life and audio problems will rule this one out. Cowon iAudio U3 and T2 I wasn't recommended any particular models, but the two I'm considering is the T2 and U3.
iAudio T2
The T2 is a necklace style player, which is rather unusual, but I can pick up a 2GB model for around 100GBP. Battery is around 12 hours using the internal rechargable battery. Looking at the reviews, the supplied headphones make up the actual necklace part and you have to remove that to use your own headphones, which is what I'll be doing, having just bought some Shure E2Cs. They also say the controls are a little confusing.
iAudio U3
This is the most expensive of the products I've looked at at 115GBP for the 2GB model. Battery life is around 20 hours. Reviews have been very positive. Not sure if it's worth the extra price though. Update: Apparently the 2GB model can only be charged via USB, where as the 1GB model comes with a charger too, Also, I read in a review that it has doesn't do gapless playback, which is very annoying. Why don't players do gapless playback? Summary I think my top choice is the iRiver T10, although each of the others have their plus points. The K-PEX is expandable, the T2 is small and the U3 gets good reviews. I think I've discounted the Samsung. I will try and find each of the players in a local shop to have a play before I go out and buy one. If you have any comments on any of these players, or you have another product to recommend I'd be very interested. Oh, and continuing my trend of discovering bands that have split up, I've been getting into At The Drive-In. :S
Read Comments (13)

Evan Prodromou: 28 Pluvi se CCXV

Ugh. I have some blogging catching-up to do, which I'm going to try to take at a fast clip. I tend to get bogged down in the daily details, which can make getting my info down electronically kind of difficult.

Trip to New York City Maj, Amita June and I drove down through upstate New York for LinuxWorld OpenSolutions Summit. It was a good drive -- really pretty going through the Adirondacks in winter. There were icicles hanging dozens of meters from stone cliffs -- really dramatic. We spent Tuesday night with our friends Jen Bohner and Massoud Marzban. Jen is a friend of mine from high school, and Massoud is her husband. They live in Sunnyside, Queens now, after a year stint here in Montreal just before Amita was born. We miss having them around here, but they seem to have settled in well in NYC. Jen is working way too hard on a master's of education while teaching 5 classes during the day in New York public schools. Despite this, they found time to make us a great dinner, open a bottle of wine, and spend the evening chatting. Really decent people. tags:

LWOSS The next morning, Valentine's Day, I got up early to go into Manhattan for LWOSS. I called for a car service that Jen and Massoud use, but they failed to show up, and when I called back they hung up on me. Deborah's Car Service, there. Make sure to miss them if you're in the area. Anyways, I managed to flag down a cab and get into Manhattan anyways. It wasn't too much fun -- there'd been a big snowstorm the night before, and traffic was gnarled and bitter. Still, I got to the event hotel -- the New York Marriott Marquis on Times Square, got checked in, and registered for the event just fine. The keynote speaker was security expert Bruce Schneier, who gave an extremely insightful talk about economic laws as they apply to computer security. It was very interesting, if hard to follow at times -- it's not always easy to keep economic theories and security practices juggling in your brain at the same time. I met up with Don Marti, who'd invited me to participate at LWOSS, in the speakers' lounge. He had assembled a great team of interesting people who know a lot about Linux and Open Source: John Mark Walker, Jeremy Allison and Jerry Carter of the Samba project, and Jeremy Garcia of LinuxQuestions. Sadly, the snowstorm had canceled the flights of two more participants, Donald Becker and Sascha Chua. (Those weren't the only two people who couldn't come because of the flying problems. I overheard dozens of conversations on cell phones of people whose colleagues couldn't make it for the show. In retrospect, it's pretty surprising that we had the event at all. Schools and businesses were closed all across New York on the 14th and 15th.) Don's plan was simple: to hold an "unconference" at the heart of the conference. We took a section of the showroom floor, set up some chairs and a big monitor for demoing, plus a whiteboard, and just started some interesting conversations. I talked about Web APIs, since I wrote an article on Web APIs for LinuxWorld.com in December. Other people talked about their own projects, about Linux distros, about tools in the Open Source toolkit, about the process itself, and all kinds of things. It was really fun and productive. (I'm realizing now that I should put Don in touch with Ted Ernst, who's been instrumental in organizing three of the Open Space events I went to in the last year. It would be really interesting to have an Open Space event the day before or after the main conference... making mental note, here.) Otherwise, the event was really pretty good. I talked a lot with Jeremy Garcia, who started using MediaWiki about the same time we started using it for Wikitravel. LQ is a really great project, and a nice mix of different community platforms. I managed to luck into an LQ t-shirt, which I'll wear proudly. The other big news, for me, was getting a loaner Nokia N800 to use during the event. The N800 is an Internet tablet, about the size of a cell phone, but without phone features. I liked it so much that I asked the Nokia team to loan me the device for a long-term review, and they agreed. So I took it home with me. Meanwhile, Maj and Amita June had a nice time tooling around New York. They went to the American Museum of Natural History on Thursday, which was pretty great -- Amita loved looking at the animals. We had dinner on Wednesday at a pub off of Times Square called The Perfect Pint -- although the food was a little more upscale than pubby. Thursday night we got a babysitter through the hotel and had drinks at the Broadway Bar (in the hotel) and dinner at The View (also in the hotel). The View is a rotating restaurant at the top of the Marriott Marquis -- pretty fun to do. tags:

UbuCon On Friday, I went to the Google HQ in Manhattan for TheUbucon, another (!) unconference, this time about Ubuntu and the people who love it. I got to hear Mako talk about the Ubuntu community process, how it works, and how to get involved. It was pretty impressive. I also did some key-signings and talked to a lot of interesting people. Including Kevin Mark, who had lots of comments on my blog. Hi, Kevin! I had to take off just as the event was getting started, to go pick up Maj and Amita June at the hotel and check out. We took a cab back to Queens, where we'd stashed the car so we didn't have pay outrageous Manhattan parking fees. Sadly, someone had taken the opportunity to key our paint job. I love you back, New York. tags:

Drive home I wanted to drive back through Connecticut, Massachusetts and Vermont on the way back, for variety, so we turned east and headed up through Westchester County. It turned out to be a real mistake -- traffic on a Friday afternoon out of New York is apparently pretty miserable. We took 4 hours to get to Hartford, by which time the baby was miserable and the rest of us were feeling pretty punked out, too. We ended up in the Motel 6 in Enfield (Connecticut) where we ordered pizza, took showers, and just got our heads back together. Today we got up early and had a nice drive through Western Mass and Vermont. The little northern New England towns were pretty beautiful in the snow, and we passed a lot of barns and farmhouses that looked like movie sets. We stopped in Burlington for lunch, and had a leisurely drive over the border and back home. When we got to our house, I had to shovel drifted snow -- about 3-4 feet deep -- out of our parking space so I can pull the car in. But otherwise the house is in good order. I'm glad to be back. tags:

16 February 2007

Erich Schubert: What does your payphone run?

A few days ago, at the main train station in Munich, subway level: 'Crashed' payphone Windowmaker dock on payphone At least this series of payphones (there are different models with a touch screen in working height or with a camera) runs some form of Unix: they run WindowMaker which is only available for X11 as far as I know. (I don't know if it's Linux or some BSD; and most likely the display component is a separate system from the actual phone. Note that some payphones at least in Berlin may also be equipped with a wireless access point running Linux, that could be even another system in the same payphone.) Still it's amazing to see where Linux is today. Have a wireless router? Have a DSL modem (e.g. AVM Fritz)? Payphone? Bottle deposit machines (e.g. ALDI)? next generation of mobile phones? - Linux is just about everywhere where people are not exposed to the mouse. :-) [Update: Daniel sent me an older picture of the phone display booting, it looks like being a SuSE. Funny (though not surprising) to see that the display is run non-rotated during boot (regular VGA), and when the driver is loaded it turns to the Portrait view.]

15 February 2007

Erich Schubert: False sense of security

This post of ubuntu-tutorials.com (via Planet Ubuntu) suggests to run sshd on a different port than 22. That does not increase security. Serious attackers aren't fooled by just changing the port; if someone has an SSH remote exploit we're all in deep trouble anyway (but that code is heavily audited, you bet!), and it's trivial to scan on other ports if a system is detected as being Unix and not having SSH on port 22. If you want to really increase security, you can If your goal actually is to get rid of those annoying (but non-threatening, if you don't have trivial passwords) messages in your log files (you DO read your log files, don't you?) - consider using the iptables RECENT match to stop them early. At the university, we have a RECENT match filter at the border firewall. It stops SSH scanners early on, giving them 5 tries total for the whole network (and they usually give up after that, not retrying when the recent match has expired). For some details on how to use the RECENT match for filtering SSH connections, read this earlier blog post on iptables SSH protection. Use the INPUT chain to filter localhost. For an example how to do a two-hop SSH connection, read this blog post. Just replace his OpenWRT router with a tighly secured SELinux gateway system. Another (without nc) is to use the LocalForward option of ssh. Just forward some local port through one ssh connection to the final machine, then do a second ssh connection over this. The gateway host could easily be restricted to only allow outgoing connections to port 22 in the fenced off network. So basically, by NOT using a different port than 22 for SSH, you can increase security (by filtering port 22 specially, knowing that it's SSH). If you start putting your SSH daemons on different ports, you're actually making firewalling much harder. Also note that in some networks, bandwidth policies are used for different ports. The SSH port usually is not limited; arbitrary ports are (since it might be a filesharing application using them). Another reason to stick to the standard ports, so you don't get punished by your network administrators!

Erich Schubert: Out of diskspace errors

... are pretty much unhandled in most applications, just like out of memory conditions. I wouldn't be surprised if some applications can also trash their data files when running into an OOM during writing. Some bug squashing parties ago I was working on xchat bug #147832 (xchat: loses server list if disk fills up). I remember that xchat was pretty much nowhere handling out of diskspace, and it has several places where it would write files. There is a bug open on sourceforge about losing user commands the same way. (but the server list is probably written more often?) Anyway, our applications, especially those written in C, are highly vulnerable to data loss if there is not enough diskspace left. We really need a library to write these files and pay attention to the error codes. (This post was triggered by the diskspace issues of wiki.debian.org and a followup post by joey hess)

Erich Schubert: iCalendar is broken by design

Seriously, RFC2445 is on crack. No wonder that few apps handle recurrence rules properly. Let me give you some examples straight from the RFC:
RRULE:FREQ=YEARLY;INTERVAL=2;BYMONTH=1; BYDAY=SU;BYHOUR=8,9;BYMINUTE=30
These are tons of events: at 8:30 and 9:30 every other year, every sunday in january. That's not precisely what I'd call a yearly frequency... I mean, we're talking about every sunday in januar. I'd more call that like... weekly. And yes, this is the official solution:
"every Sunday in January at 8:30 AM and 9:30 AM, every other year"
Note that you can not do 8:30 AM and 9:00 AM. You could do 8:00 AM, 8:30 AM, 9:00 AM and 9:30 AM (using BYMINUTE=0,30). Pure crack.
Everyday in January, for 3 years:
DTSTART;TZID=US-Eastern:19980101T090000 RRULE:FREQ=YEARLY;UNTIL=20000131T090000Z; BYMONTH=1;BYDAY=SU,MO,TU,WE,TH,FR,SA or RRULE:FREQ=DAILY;UNTIL=20000131T090000Z;BYMONTH=1 Isn't that totally on crack? Using FREQ=YEARLY for everyday in january? Notice how the semantics of "BYMONTH" change? In the first case, it's creating multiple events (BYMONTH=1,2 would name january and february independently); in the second case it's used to filter out individual days. Let me explain that a bit more: FREQ=YEARLY;BYDAY=MO,WE means every Monday and Wednesday. See how the modifier makes about 104 recurrences out of a single year? FREQ=HOURLY;BYDAY=MO,WE means every hour, but only on Monday or Wednesday. In this case, the modifier reduces the hourly events by throwing out all that are on other weekdays, reducing the number of recurrences. Again, this is not my weird reading, but the RFC says:
BYxxx rule parts for a period of time which is the same or greater than the frequency generally reduce or limit the number of occurrences of the recurrence generated. [...] BYxxx rule parts for a period of time less than the frequency generally increase or expand the number of occurrences of the recurrence.
(Note that I didn't find any details on if they consider a week to be be "less" or "more" than a month, since there is no obvious subset relationship, but a week can overlap two months, and a month usually overlaps five weeks... So if I have FREQ=WEEKLY;BYMONTH=1;BYDAY=WE, is that Monday in every week overlapping January? Every week completely contained in January? If I'd want every Monday in January, I'd use FREQ=DAILY;BYMONTH=1;BYDAY=MO...) Intersecting or joining two RRULE specifications is usually impossible (try to write one rule that is 8:00 and 9:30 every day for convincing yourself that a join won't work, and try to intersect FREQ=DAILY;INTERVAL=3 and FREQ=YEARLY;INTERVAL=2...) Anyway, I'm truly not suprised that my mobile and probably many other applications don't handle recurring events completely (that is when importing from iCal they often just lose the repetitions). My own implementation is doing okay. There are still a few missing features (BYSETPOS e.g. which can be used to say "the second to last tuesday or thursday each month"; should be trivial to add however, just picking the appropriate indexes out of a list), and some odd corner cases to dig in the specs and resolve (e.g. "every other week on friday, starting saturday march 3" - are we talking in business weeks, or intervals of 7 days here? When talking in weeks, is it friday in the week containing march 3, or following march 3, since that day itself is not a friday!) Some of these details probably vary heavily from iCalendar-supporting application to another... e.g. FREQ=DAILY;BYHOUR=8;UNTIL=20070215T000000Z does this include a recurrence on 2007/02/15 at 8:00 (which is past the UNTIL time, however the hour of the UNTIL field is not used in presence of BYHOUR). If you ever design a language for specifying recurrences, please: Consider something like (intersect (repeat daily interval=3) (union (repeat weekly monday) (repeat monthly 1) ) ) (i.e. every 3 days, if they fall on the first of the month or on a monday) Also spend some time thinking about alignment: "Every monday in a week containing the 15th of a month." - months and weeks are not aligned; assuming a week being defined as Monday-Sunday, this can be any day between the 9th and 15th of the month (in fact you could specify this in iCalendar, but it's probably easy to come up with an example that is too difficult to represent in iCalendar RRULEs, albeit trivial to calculate.)

13 February 2007

Miriam Ruiz: Threads considered harmful (what about coroutines?)

In 2006, Edward A. Lee wrote The Problem With Threads (PDF), in which he observes that threads remove determinism and open the door to subtle yet deadly bugs. While the problems are maybe manageable on single core systems, threads on multicore systems are likely to magnify the problems out of control. According to Wikipedia, coroutines are “program components that generalize subroutines to allow multiple entry points and suspending and resuming of execution at certain locations”. Coroutines are well-suited for implementing more familiar program components such as cooperative tasks, iterators, infinite lists, and pipes. Coroutines are more generic than subroutines. The start of a coroutine is the first point of entry, and places within a coroutine following returns (yields) are subsequent points of entry. Coroutines are also a lot faster than processes or threads switch, since there is no OS kernel involvement for the operation. Even though coroutines are supported in some high-level languages, there doesn’t seem to be an standard implementation of them in C or C++. The first time I heard about coroutines were in Lua. Since then, I’ve been trying to find a good solution for using them in C. Simon Tatham proposes a way of implementing them with a combination of subroutines and macros, but I think that, even creative and clean, this is a dirty approach for real code. What about handling with errors in the code? I still have nightmares when I have some problem to debug in STL-based code. Cryptic, the least. Due to the limitations of standard C libraries, some authors have written their own libraries for coroutines:

12 February 2007

Christian Perrier: fr: 99.858%, cs: 93.351%, de: 81.634%, sv: 79.566%, vi: 78.259%

libapache-mod-backhand upload bumps our stats a little. New planned uploads (and 100%, hopefully) for next Thursday after the end of the call for translation updates I posted for wmmoonclock, atokx and atokx2. The list of "bad boys" is shortening down quickly, now. Today's NMUs: plan, atftp, mediamate. Today's uploads by maintainers after a little nag from me: gnumeric.

9 February 2007

Erich Schubert: XML schema datatypes

... suck. The XML Schema "datetime" format can't be handled by Java's SimpleFormat (ok, that probably is more Javas fault, of not being able to handle hours:minutes in the timezone specification, anyway, this is mildy annoying). The XSLT2 parsers are very intolerant about the format of the time specification, too. They could have made more stuff optional such as the specification of seconds; an error here will make the whole XSLT fail with an exception. Some compact form of error handling would be nice... as would be a smart parser which can handle various formats. The XML Schema "duration" is even worse. First of all, it was completely forgotton when doing XSLT 2; there are no functions to format or disassemble it (except by regular expressions, which could also use a zero-width lookahead). Secondly, it's lacking common specifications such as "next week". While "next week" is computationally equivalent to "in 7 days", it can have different semantics in some contexts (especially when not being aligned): If I'm looking for the week February 9th 2007 is in, the result is February 5th two February 11th. If I'm looking at a 7 day interval containing this day, there are infinite possibilities (aligned on milliseconds and below...). So it does make sense to make a difference between 7 days and a week.

Erich Schubert: DBus user bus?

So far, DBus has two types of busses: the session and the system bus. The session bus is used by most of your desktop applications. The system bus is used e.g. by Hal signalling that new hardware was added, or by NetworkManager for network connectivity changes. The system bus is protected via a security policy. Problems arise now when you need to locate your session DBus from a different session. For example, from a cron job. There is a DBus application called "notification daemon" which can display popup baloons. This is useful for signaling yourself e.g. the completion of a long-running computation or just about anything you want. But it's using the session bus, so you can't reach it from outside of your current session. A year ago, I wrote a hack for this, which will locate your current Gnome session, read the environment variable to find the session bus and then send a message to the sessions notification-daemon. This is an ugly hack, however yesterday and today people asked on #dbus precisely how to do this. It seems to be a common question. Maybe DBus should be extended by a "user" DBus, and applications such as music players or the notification daemon should actually listen on that bus (as well). Maybe it could also be made possible to (securely) locate your session DBus via the system bus, I don't know how detailed the security policies of the system DBus are.

Christian Perrier: Interacting with translators: what to do?

Holger Levsen made an interesting suggestion to me today: instead of whining against maintainers who do not interact with translators without explaining what I expect from maintainers, I should maybe explain what we expect. This makes pretty much sense indeed...:-) So, below is the mail I usually send to these maintainers:
Hello,
I just noticed new/modified debconf templates appearing for this
package.
I would like to suggest you to consider calling for translations when
introducing new debconf templates or changing the debconf templates in a
package or, if you prefer, to send a call for translations after uploading
the first version that introduces new templates or templates changes.
How to do this?
0) Install po-debconf
---------------------
If you test-build your package on your system, you shoud already have
it. Otherwise, consider apt-get installing it.
it will bring the needed utility.
1) Call for new translations
----------------------------
Just go to your package's build tree and use:
$ podebconf-report-po --call
This will propose you a generic mail which is to be sent to
debian-i18n@lists.debian.org and call for new translations.
This utility will mention existing translations to avoid duplicate
work.
It will also attach the needed material to this mail.
Please also think about giving a deadline to translators. We like
deadlines..:-)
2) Call for translation updates
-------------------------------
If your package already includes debconf translations (ie *.po files
in debian/po), please consider calling for translation updates if you
happen to change something in the templates...or just in case when you
release a new version.
This is done with the following command:
$ podebconf-report-po
This will build private mails to translators (ie people listed in
"Last-Translator" in the PO files) for translations that are
incomplete. These mails will included the needed PO file for each
translator.
3) Check for writing style compliance
-------------------------------------
The Debian i18n contributors have developed a set of suggestions for
the writing style of debconf templates, to give them an overall
consistency all around Debian. These writing style suggestions are
explained in the Developers Reference. Lintian also warns about common
writing style concerns.
If you change your templates to fit this, please consider 2), of
course..:-)
Of course, everybody will notice that this can be applied to any gettext-based internationalised software.

Ross Burton: GUADEC 2007 Pre-Call for Papers

I plan on announcing the GUADEC 2007 Call for Papers in the next day or so, so I want everyone to put their thinking caps on and consider giving a talk this summer. There are several topics I'd like to see a good set of talks on:

MJ Ray: Dude, where's my ad budget?

Or: Collateral Damage by the Cult of Celebrity. Or: The Hidden Costs of Downloading Porn. (No, I've not seen the film filked in the post title.) I got a work call from the advertising manager of one of my customers. They are just starting out with pay-per-click adverts. I understand that it's been working OK for the last few months, increasing their number of sales and general interest by enough to cover the cost. In general, each time they refined their campaigns or spent a little more, they saw a positive result. I got a call because since the start of February, they were suddenly spending a lot more money, without any corresponding results. Was there foul play? Had a competitor noticed their adverts and kept clicking them from different browsers? In short, was someone running a click-fraud attack on them? This is the sort of question I enjoy. (I did a statistics degree, but I don't use it directly in most of my work.) I massaged the logs and computed some general-purpose statistics. First, I looked for obvious attacks: were any particular machines or domains responsible for most of the clicks? Most non-IT people use the same ISP at home and at work, in my experience, so if it was a particular competitor, I'd expect to see lots of clicks from one domain. Nothing really stood out. The next thing I looked at was the geographic locations, very roughly. The pay-per-click adverts are targetted at European users on European sites. If it was some sort of distributed denial-of-service attack, I'd expect to see some increase in American and Asian traffic. Where were visitors coming from? I looked up locations by the first part of the IP address, which is crude, but good enough for this. You could even do something similar with the the xkcd ipv4 map - it looked like most of the addresses were in Europe, which is what I'd expect. There was one interesting US grouping, but that turned out to be one of the ad networks checking their ad links were still valid. So, I compared the time distributions of clicks now with clicks a month ago (when the ads were working fine). There were increased numbers of clicks just before 9, just after 17 and midnight-4 local time. I could dismiss the clicks just outside 9-17 common work hours as people looking to buy for their hobbies, but midnight-4 is a bit strange. Looking in more detail, the midnight-4 clicks were coming mostly from ad placements on one site. Looking at that site, it seems they specialise in 'sexy videos' of celebrities. Needless to say, that was not my customer's intended target market! I used that information to look at the whole dataset and see how much of the increase was due to that one site. Almost all of it was from there. Scores per night. Did any of those visitors stay long? Nope. It even looked like some of them were just private web spiders, downloading a page and all links from it, which I guess people might use to bulk-download videos overnight. So those results were sent to the advertising manager and they've updated their campaigns to exclude that site and any others related to sexy videos. It reminds me of the John Wanamaker quote
"Half of my advertising is wasted, I just don't know which half."
Maybe by working out statistics from the logs, we can reduce it from half for web ads - or at least limit it to half?

8 February 2007

Erich Schubert: Calendaring in a semantic wiki

... is the working title of my diploma thesis. Tomorrow I'll hold the introductory presentation on my topic in the research seminar. This is to explain my project to other members of the working group, so they can give me feedback and suggestions. What I'll be doing: Where I am: Difficulties: Fortunately, we have a rather strong research group here in Munich. There are experts for query and transformation languages (e.g. Xcerpt, SPEX - Querying XML Streams), temporal calculations (Computational Treatment of Temporal Notions, CTTN) and time modeling Calendar and Temporal Type System CaTTS); and I'm also working closely together with the author of IkeWiki and Xcerpt. And of course they're all nice people to work with!

6 February 2007

Ross Burton: Xrandr 1.2

Since I got my 20" widescreen monitor in the summer, I discovered how bad X's support for resizing displays is. I wanted to have the ability to plug my laptop into the 20" display in the office and expand the desktop to 1680x1050, or remove the 20" display and shrink the desktop back down to the native resolution of 1024x768. It turns out that a number of factors were stopping this, and the only way to do it would have been to restart X. Because of this I ended up using the display at 1024x768 when I did use it, but mostly I stayed on the sofa. Then I heard about xrandr 1.2, the all-singing all-dancing revision of the X Resize and Rotate extension. Basically, it would solve my problem, and as luck would have it my laptop has an Intel chipset and the people hacking on it work at Intel. Yesterday after lots of poking I finally made it all work for this. This involved a lot of poking and a little black magic. The first step is getting an X server new enough. First, you'll need to update some X protocol headers. We'll start with the easy ones that have had releases (grab the latest release you can find): Then you'll need to update various other bits of X: Once this is done and X still works, it's time to brave the perilous world of git. If you've never used git before, it's quite simple for this. Go to the git browser and find the module you want to check out. Click on it, and you'll see two URLs: you want the anongit one. Do git clone [url], and then if I've specified a branch other than master, cd into the directory and do git checkout [branch]. For example:
git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-intel
cd xf86-video-intel
git checkout modesetting
You'll need to grab: Build it all in that order. The order is important as if you build the Intel driver against randr 1.0 instead of 1.2, it won't do what you want. By now you should have an X that looks no different. But...
$ xrandr
Screen 0: minimum 320 x 240, current 1024 x 768, maximum 1680 x 1050
VGA disconnected 0mm x 0mm
LVDS connected 1024x768+0+0 246mm x 185mm
   1024x768       50.0 +   60.0*    40.0  
   800x600        60.3  
   640x480        60.0     59.9  
TV disconnected 0mm x 0mm
Now that is clever. Here you can see that I don't have anything connected via VGA, my LVDS (no idea what this stands for, but it means the laptop's panel) has a preferred mode of 1024x768 (thats what the * means), and I have nothing connected to the TV output (because Lenovo didn't wire it up). Now if I plug something into the VGA and run xrandr -s 0 (select default screen size), the external display should power on. Xrandr doesn't try to be too clever, it will leave that to desktop daemons, but by default it will try and make something appear on all of the connected displays. In this case, my 20" TFT gets a clone of my laptop panel, at 1024x768. That is no good though, I want to turn off the laptop panel (as I'll be shutting the laptop) and switch the external display to 1680x1050. This is where the black magic starts... Currently the Intel driver cannot resize the physical framebuffer in memory after X has started, so it defaults to a framebuffer of 1200x1024 (IIRC). That isn't big enough to hold 1680x1050. Also the Intel driver doesn't detect any modes from the TFT. This may be Dell being stupid, or the EDID parser in the driver being too restrictive, I don't know. Luckily we can still use modelines in xorg.conf so I added this:
Section "Monitor"
        Identifier "Dell TFT"
        # This is a standard modeline for 1680x1050 at 60Hz
        Modeline "1680x1050" 149.00  1680 1760 1944 2280  1050 1050 1052 1089
EndSection
        
Section "Screen"
        Identifier      "Screen"
        Device          "Intel"
        Monitor         "Monitor"
        # This says that when using a monitor on the output called VGA, use the
        # settings in the monitor "Dell TFT"
        Option "monitor-VGA" "Dell TFT"
        DefaultDepth    24
        SubSection "Display"
                Depth 24
                # This tells the screen to allocate a frame buffer up to
                # 1680x1050.
                Virtual 1680 1050
        EndSubSection
EndSection
With this, everything just works. If I xrandr with various displays plugged in I can see what they support and can switch modes. To make everything nice and easy I wrote a small script that I bound to an unused function key:
if xrandr -q   grep -q  "VGA connected"; then
  xrandr --output LVDS --off --output VGA --mode 1680x1050
else
  xrandr --output VGA --off --output LVDS --mode 1024x768
fi
(thanks to Eric for pointing out that I don't need to use the hex values). Simple! As you can see the new xrandr is very powerful. If you want to do Xinerama-style dual screen you can do that too: xrandr 1.2 encompasses that behaviour. The final thing to point out is how glad I am that GNOME seems to handle the screen resizing like this so nicely already. When the desktop shrinks Metacity moves windows so they are visible, and when the desktop expands the panel applets on the right stay on the right instead of sitting in the middle. The script I run when I change screens does more than I pasted here: it changes the wallpaper to match the aspect ratio, and also changes the fonts. I hope this has made sense, I know there are a few people out there who were waiting for me to test this before they gave it a go. If anything is too vague, leave a comment and I'll expand it. I should also mention that I've got Ubuntu Edgy packages for everything here in my repository. NP: Animal Magic, Bonobo

5 February 2007

Mike Hommey: Google Keywords

I’ve done this exercise a long time ago, but I think last time was before the first post with Wordpress. So here it is: my improbable (or not) best of search engines keywords for january (provided by webalizer). “ ” - !
“debian fundamentalism” - where ?
“asa dotzler troll” - did Blake Ross post here ?
“could have agree with you anymore” - all your opinion are belong to you
“do i need firefox if i have iceweasel” - firewhat ?
“your name in firefox 2″ - I know
“lifelike androids” - paranoid ones are better
“dumb ass” - still ?
“blitzer blog” - wrong address
“a lot of horse facts” - i don’t know what to say
“damage harddisk instantly” - drop your laptop from the 10th floor
“iceape vs iceweasel” - none of the above
“do you like the american accent” - no
“facts about the horse” - what is it with the horse ?
“feliz a o nuevo happy new year ” - Bonne ann e !
“free mozilla firefox” - as in beer ?
“icebrowser community edition” - nice one
“normal life” - what is it ?
“shake laptop crash hard drive” - shake it the other way
“trademark versus copyright”, “trademark vs copyright”, “trademark vs copyright vs gpl”, “trademark vs reserved”, “trademarked and copyrighted logo”, “registered trade mark vs copyright” - ask mozilla, they are knowledgeable
“what should stop working” - you
“what is a patent” - something I hate (I’ll tell you stories about that soonish)
“why does debian call firefox iceweasel”, “why does debian name firefox iceweasel”, “why iceweasel debian instead firefox” - because we can’t call/name it firefox
“will flashplayer work with iceweasel” - why not ?

Next.

Previous.