Planet PLUG

Planet PLUG is an aggregation of blogs written by members of the PLUG community. The opinions expressed are those of the original authors. Discussion of subject matter should be conducted on the author's blog, and not on the PLUG mailing list.


August 18, 2008

mikegrb

No upstart Docs + asshole Canonical Employees = Fail

I was in need of a means to disable upstart scripts in /etc/event.d via some means other than getting rid of the file. Since upstart has no documentation to speak of, I asked my buddy Google.

Google pointed me to the year old bug 94065 in launchpad. I added a quick ‘me too’ and subscribed to updates on the bug. This was back in March. Fast forward to last week and this arrives:

** Changed in: upstart
      Target: 0.5 => None

--
Add non-destructive means to disable a job
https://bugs.launchpad.net/bugs/94065
You received this bug notification because you are a direct subscriber
of the bug.

There is no mention of this change in bug meta-data on the launchpad site, or maybe I’m just not finding it since I lack the doctorate in navigating launchpad necessary to be able to use the site. This prompted an update from the original reporter on the bug asking for more information:

is there a disable method yet? i reported this initially over a year ago. (there may be, but since there’s no upstart manpage on hardy, it’s hard to know. :-)

Now for the asshole fail:

Scott James Remnant wrote on 2008-08-14: (permalink)

Does this bug report say that there is a disable method? Is it marked Fix Released?
No.

I’m not sure what Scott James Remnant <scott@canonical.com>’s roll at Canonical is but perhaps it should be modified to remove any tasks that involve interaction with the public?

by mikegrb at August 18, 2008 04:07 PM

August 15, 2008

yonkeltron

Cool thing of the week: make photomosaics with Metapixel

While I have been aware of this particular program for some time, only recently have I had another use for it. Metapixel is a program for generating photomosaics which produces spectacular results. Basically, it (the metapixel-prepare utility) recurses through a directory filled with photos and processes them into a special collection of prepared images with a very large index file. Then, you can specify an input image to be made into a photomosaic according to a multitude of parameters.

This is the original shot

This is the original shot


Here is the show as a photomosaic!

Here is the show as a photomosaic!

The examples page does a pretty good job of showcasing Metapixel’s configurability and the results produced by several sample configurations. It’s also rather fast, I made 16 large photomosaics from a db of around 7300 photos and they were done in under 10 minutes on my 1.83Ghz Core Duo.

by Jonathan Magen at August 15, 2008 09:45 PM

Elizabeth Bevilacqua

The Last HOPE

Last month I attended The Last HOPE with my friend Mike from New Jersey. It was a really fun weekend during which I took no pictures - so I sorted through Mike’s photos and am posting them to pass them off as my own.

In spite of waiting years to go (Mike’s bugged me last time around to go), one of the most exciting things about the weekend was meeting people I’d known online but had never met in real life. Shortly after arriving I met up with Dan Christensen, who I know through some of the Linode guys, we’ve chatted on IRC some. Soon after Mackenzie Morgan and I found each other through txt-o-location, I’ve known her for quite some time through work with Ubuntu. After the first panel I attended was “attacked” in the hallway by Leigh Honeywell and invited to a party Saturday evening, unfortunately that was the only time we bumped into each other that weekend, I’ve worked with her a lot in Ubuntu Women and it would have been cool to talk more off-IRC.


From the Steven Rambam talk - he didn’t get arrested this year, but he’s a bit much for me. And a picture of one of the RFID receivers that were placed throughout the hotel for The AMD Project.

The AMD Project was pretty cool, people who pre-registered had the option of getting badges with RFID transmitters that would track you through the conference. The released the metadata last week, so I was able to snag info about where I was from I arrived Saturday afternoon through closing ceremonies Sunday. They also synced up the locations with some of the talks, so you can also see talks I attended. Neat… except for when my cellphone turns into a transmitter …or maybe that’ll be the twitter of web 3.0.

Friday night a bunch of us got together for a sort of LinuxChix dinner at Ninja New York that Katie organized. The restaurant was more than a little campy, but the sushi was fresh and the place was a real treat. I got to meet Jennifer and her husband for the first time as we navigated through the subways of NYC, and was also able to see Laura (and her talk at HOPE!) and meet her new husband. Surprisingly I also got to finally meet Simon Law as well. We’ve known each other through Ubuntu stuff for a couple years (he used to work for Canonical) but never crossed paths until that night. It was a pleasure to meet, we got to thank each other for our Ubuntu work ;)

Sunday was all talks for me. I got up early and lurked in the 18th floor hallway with my laptop until the talks started, when I migrated into the Hopper room and camped out all day.


Adam Savage was a guest speaker at the con! Very cool. And a photo from prior to the closing ceremony when the networking team was discussing how the setup went.

Things wrapped up Sunday evening. So I stole Mike’s camera and took his picture, he returned the favor by snapping a lousy picture of me, hah!

Then we needed some dinner so Dan, Mike and I met up with Mike’s friend dedsysop who lived in the area and I’d only known vaguely through IRC and stories until then. He’s a New York local and took us to a good nearby pizzeria before we took the 10:30PM train back to New Jersey, and then from there I drove back to Philly, not getting home until past 1AM. Long weekend, but loads of fun - I’m certainly planning on going to The Next HOPE.

by pleia2 at August 15, 2008 12:06 AM

August 14, 2008

Elizabeth Bevilacqua

Tell me about your smartphone

My cellphone contract runs out in November. I currently have a boring, basic old pink Razr that can make phone calls and do text messaging. My next phone will be smart!

Requirements:

  • Good broadband
  • Good SSH application (included or addon)
  • Good OS (lag and crashes suck)
  • Physical qwerty keyboard (iPhone need not apply)

Desirables:

  • Good web browser
  • 3rd party app support (an API for 3rd party app development would be awesome)
  • Good battery life
  • Google calendar syncing support
  • Ability to work/sync/transfer stuff in Linux (Not a requirement because I can install Windows on some machine somewhere if I need, but I really really REALLY don’t want to…)
  • Pink!

Anyone have a phone that satisfies these requirements and is on the market right now? There is a lot of buzz around future smartphones, open source smartphones, Google smartphones - but I need something serious that works right now, so when November rolls around I know I’m making a solid professional investment and not throwing cash at a lousy first generation toy. Cost isn’t a serious issue, but I’d like to keep the cost of the phone under $400 and the monthly agreement under $100.

by pleia2 at August 14, 2008 04:00 PM

August 11, 2008

mikegrb

The Definitive qmail Patch


I have spent quite some time working on the definitive qmail patch. So as not to keep all this goodness to my self I have decided to make this patch available to all:

http://thegrebs.com/~michael/netqmail-1.06.patch.bz2

by mikegrb at August 11, 2008 10:08 PM

August 06, 2008

Walt Mankowski

Selecting reserved word columns in SQLite

This week I've been accessing an SQLite database created by a Ruby on Rails app written by one of my labmates. It turned out that one of the tables had a column named "order", and another had a column named "group". These were perfectly reasonable names based on the data; however, they're also reserved words in SQL, which makes them tricky to access.

The trick is to wrap the bad column names in double quotes. In other words, instead of using

SELECT foo, bar, order FROM baz;

which returns an error, use

SELECT foo, bar, "order" FROM baz;

In fact, looking through the schemas it appears that RoR wraps all the column names in quotes. I suppose this must be so that RoR developers can name their fields anything they want without having to worry about the underlying implementation in SQLite.

by waltman at August 06, 2008 01:38 AM

August 05, 2008

Elizabeth Bevilacqua

New R2D2!

While at the Trenton Computer Festival this year, my festival-mate and I were snagged by a colo selling off a bunch of old and unused equipment - cheap. It was the last hour of the festival, so they were really trying to unload stuff, I admit to being the one who finally got suckered in. We walked away with quite a catch though, and since then I’ve been building up my new desktop around the motherboard and CPUs I purchased that day.

My new desktop, dare I call it that, is now up and running. It only lacks a graphics card, which I’m getting for free tomorrow night. Specs are as follows…

Intel Server Board SE7525GP2 w/ 2 dual core 2.8ghz Xeon CPUs: $150

2 x 1GB 184-PIN REG DIMM 128MX72 DDR PC2700: $150
(server board, requires registered DIMMs)

Chenbro SR10568-AL Chassis and mounting plates: $100

680 Watt Power Supply: $40

Sony PATA DVDRW: $35

WD 500G PATA drive: $100

Soundblaster Live card: Free, from 2001, snagged from old PC

ATi X300: Free, from a friend.

Total: $575

Sure, I probably could have done better cost-wise if I didn’t go with server-class this and server-class that (certainly my case, power supply and RAM expenses could have been lower), but where’s the fun in that? Plus, I plan on this beast lasting me a long time, it’s replacing a desktop I’ve had since 2002.

by pleia2 at August 05, 2008 11:31 PM

August 02, 2008

Elizabeth Bevilacqua

Made the leap to flatpanel

As seen here, I was one of the last geeky holdouts I know to still have a CRT for daily, normal use. Well I, sorta on a whim, left that camp today and while at Micro Center picked myself up an Acer AL2216W flatpanel monitor.

Boy does it shine! I’m very happy with my purchase.

(Also, Micro Center is a dangerous place - last time I was there I walked out with two new harddrives - now ths! I was only there to grab a cheap OEM dvd-rom drive…)

by pleia2 at August 02, 2008 10:28 PM

July 31, 2008

Walt Mankowski

Logging back and forward buttons in Firefox

As promised, here's my extension. First, a disclaimer. Though it's unlikely with something this simple, buggy extensions can mess up your Firefox profile, including your bookmarks, cookies, plugins, preferences, and so on. If you're paranoid, see the Firefox documentation on how to create a development profile.

The first thing you need to do is create a directory for your extension. I put mine in ~/extensions/backlog. In that directory we're going to put 4 files:

  • chrome.manifest
  • install.rdf
  • content/overlay.xul
  • content/overlay.js

chrome.manifest tells Firefox where the files are for the extension. This is right out of the Mozilla documentation.

content backlog content/
overlay chrome://browser/content/browser.xul    chrome://backlog/content/overlay.xul

install.rdf tells Firefox meta information about the extension:

<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <Description about="urn:mozilla:install-manifest">

    <em:id>backlog@viscog.cs.drexel.edu</em:id>
    <em:name>Back Log</em:name>
    <em:version>1.0</em:version>
    <em:description>Add history log entries when hitting back button</em:description>
    <em:creator>Walt Mankowski</em:creator>

    <em:homepageURL>http://kb.mozillazine.org/Getting_started_with_extension_develop ment</em:homepageURL>

    <em:targetApplication>
      <Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>3.0</em:minVersion>
        <em:maxVersion>3.0.*</em:maxVersion>
      </Description>
    </em:targetApplication>

  </Description>

</RDF>

Most of that is boilerplate. The most important field is em:id, because that's how you'll identify it to Firefox later on. Note that it has to be in the form of an email address, though it doesn't actually have to be a valid email address. In this extension it's important that em:minVersion is set to 3.0, since I'm using a Firefox 3.0 feature to do the logging.

content/overlay.xul tells Firefox what part of the browser we want to extend. In the tutorials they do things like add "Hello, world" somewhere in the browser window. Here I want to leave the window itself alone and just add some javascript.

<?xml version="1.0"?>
<overlay id="backlog-overlay"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <script src="overlay.js"/>

</overlay>

content/overlay.js is the javascript code that does the logging when the forward and back buttons are pressed.

window.addEventListener("load", function() { Backlog.onLoad(); }, false);

var Backlog = {
  onLoad: function() {
    // initialization code
    var appcontent = document.getElementById("appcontent");   // browser
    if (appcontent)
      appcontent.addEventListener("pageshow", Backlog.onPageShow, true);
  },

  onPageShow: function(aEvent) {
    var doc = aEvent.target; // doc is document that triggered "onPageShow" event

    // this service is Firefox's API for logging history events
    var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"]
                                    .getService(Components.interfaces.nsIGlobalHistory2);

    if (aEvent.persisted) // page pulled from cache, so log it
        historyService.addURI(doc.documentURIObject, false, true, null);
  }

};

When the overlay is loaded, I add a listener for the pageshow event. This event is triggered both when a new page is displayed (e.g. when clicking on a hyperlink) and when a page is pulled out of the cache via the forward or back buttons. When the event occurs, I check the persisted flag. This is set to true when the page is in the session history, i.e. we've already seen the page once, and now we're seeing it again with Forward or Back. Firefox normally doesn't add these pages again to its history database, but that's exactly what I wrote this extension to do. To write the URI out history, I call addURI() in the nsIGlobalHistory2 service.

It's possible to package up extensions so that they install automatically, but since I only need this to run on a single box I didn't bother. Instead I just followed the instructions for testing extensions. It turns out that while extensions themselves contain lots of ugly XML and javascript code, testing them is really easy. Just go to your Firefox profile directory. (On my box it's ~/.mozilla/firefox/.default.) Then go one level deeper to the extensions directory. In that directory, create a file whose name is the id of the extension ("backlog@viscog.cs.drexel.edu" in this case). The file should contain a single line containing thee root path of the extension ("~/extensions/backlog"). Finally restart Firefox, and you should see a message saying that it's found a new extension. If you decide to disable the extension, just remove the file from the extensions directory and restart Firefox.

by waltman at July 31, 2008 03:45 AM

July 30, 2008

Walt Mankowski

My first Firefox extension

I've done a lot of unexpected things in grad school, but I never thought I'd find myself writing Firefox extensions. But we're doing some experiments in finding patterns in web browsing, and I needed to add an entry to the Firefox history database when the user hits the back button. Firefox doesn't normally do this, but a developer hanging out on #firefox assured me it was possible.

It turned out to be only about 10 lines of javascript, but of course coming up with the right 10 lines of javascript, and figuring out how to package them into an extension, took all day.

I'll try to post more details once I get a chance to clean out all my debugging code and hopefully make a more minimal version than what I have.

by waltman at July 30, 2008 05:11 AM

July 23, 2008

yonkeltron

A $200 tablet?

A recent blog post on TechCrunch discusses their plans to try for the construction of a $200 tablet for light browsing with a modified Firefox 3 (in a special kiosk mode) and VOIP thanks to Skype. Now, we’ve heard rumblings of low-cost, touch-based computing devices before. Remember concept stuff from the XO-2 which was supposed to be the second OLPC? The idea was to have it be an ebook-style device with dual touchscreens and a sub-$100 price tag. Shortly following the announcement by the OLPC guys, some researchers from Maryland and Berkeley showed of a prototype ebook reader that responded to hand-generated movement like opening and closing the leaves to advance the displayed pages.

While the dream of a lightweight, $200 tablet seems a little far-fetched, the blog post does show that some serious thought went into this. They are very insistent that the proposed device run a stripped down version of Linux that will boot right into Firefox instead of a traditional desktop. From there, the plan is to have a special start page with “large buttons for bookmarked services” linking to sites of great interest and/or utility.

With this in mind, it stands to reason that SproutCore would be an excellent way to build this start page. By designing the startup page as a SproutCore application, the whole experience can be constructed in a completely customized way while still maintaining whatever parts of the traditional application experience are desired. Furthermore, SproutCore apps can be cached can be automagically and transparently upgraded as well as cached on the client so that basic functionality can be maintained even in the absence of a WiFi link.

After a little bit of thought, I think that the main interface (with the big buttons) should be a draggable grid of icons so that a user may reposition applications according to their preferences and usage patterns. Additionally, there should be a basic configuration interface allowing users to add or remove sites from the startup page. After that, anything else seems like an added complication even if it’s really, really interesting.

by Jonathan Magen at July 23, 2008 09:38 PM