Search Results: "sf"

1 August 2006

Simon Law: 2006 Ottawa Linux Symposium


Penguin and his boy
Originally uploaded by sfllaw.
The Ottawa Linux Symposium is arguably Canada's biggest conference about Linux and its associated technologies. It happens every year, right after the Kernel Summit, which virtually guarantees that some famous people stick around afterwards to attend OLS. Now the Kernel Summit is a small gathering of Linux developers where they hash out big issues in the kernel. After all, it's a lot easier to get your point across when you're sitting in the same room as the person you're talking to. Mailing lists are just not the same. OLS, however, is a free-for-all. If you pay in time, you get to show up. This makes for an astoundingly large conference, about 850 people in total. I brought along [info]wlach, who had never been to OLS before. So I was doing my part in inflating the number of people there. I think he ended up in the right crowds. Which is difficult, because there are a lot of crowds there. People walk past in a blur and you can never quite remember if you've met someone before.

Bowtied
Originally uploaded by sfllaw.
At the conference, there are four tracks of presentations, at any one time. Some of these are perennial talks, like the tutorial on writing your own kernel module. And others change as the years go by. The big topic this year was Xen, the free virtualization software that really got huge in the past two years. Xen allows people to run multiple copies of their operating system inside one computer, with very little overhead. This makes it attractive to a lot of people, be they system administrators, software developers, or people who like fiddling with their machine. I met a consultant from Chicago that sells Xen-based solutions. She builds a big server and runs various virtual servers for small business inside that one box. It's very cost effective and is a good way to make server maintanance easy. Whenever I wanted to find her, I'd just pop into one of the ubiquitous Xen talks. The amount of work that gets done at this conference is astounding. You'll see people sitting around at tables hashing out designs and beating out flaws. Hackers huddle around laptops in an attempt to get the C library building on PA-RISC again. That's because the bandwidth to communication is very high and the latency is inconsequential. There were times when I wanted to pull out my laptop and do some work. But then I remembered that I left it in the hotel. Because it's heavy. There's actually a lot of space at OLS, because it's spread across the three floors of the Ottawa Congress Centre. It's really easy to miss someone for weeks before bumping into him at a party. Like [info]opalmirror, for example, who I was very glad to meet in person. And are there ever parties.

Super balls
Originally uploaded by sfllaw.
Ostensibly, you go there for the talks. And talks there are: some of them quite good and the vast majority are rather mediocre. They're the results of a year of hacking, months of academic research, or inspired observation. I have to admit that I get a bit lax when attending speakers. It reminds me too much of the classroom. And just like university, I buy the course notes to mitigate my guilt. They make for good reading when finals come along. It's the conversation that you go there for. When you get to sit down with Alan and have a good laugh about geeky topics. Or buy Donald a drink for working on those ugly network cards all those years ago. You get to connect with people that you've only seen online, or read as their names flashed past in the boot messages. That's that kind of bonding that people yearn for. I'm looking forward to next year already.

Erich Schubert: Speeding up Bittorrent

I've recently used bittorrent a bit. For example, I loaded the Ubuntu installer CD with it. For power users, I think rtorrent is a good client. I tried freeloader, but apart from some obvious bugs (it doesn't save the maximum bandwidth settings value), i'm lacking interesting information such as the number of peers or of distributed copies. When toying around with rtorrent and it's options I noticed a couple of interesting things. First of all, if you're firewalled, you'll be much slower. Allowing incoming connetions (and having a port forwarding in your router) makes a huge difference in the number of peers. My estimates are that 70% of peers are firewalled; if both of you are, you can't transfer data! The other thing is that apparently BitTorrent clients use some kind of "Tit for Tat" strategy. They request a packet, you request a packet. If you don't send them data, they'll stop sending you any. They'll still eventually retry (maybe you were overloaded), but largely your download speed will be related to your upload speed. I don't know how much peers (and seeds) trade information on who has which parts or is sharing how much upload speed. I guess they do somehow to deflect cheaters. Assuming that the illegal file sharing tools work similarly, this gives some interesting (theoretical?) ways to recude illegal file sharing:

31 July 2006

Enrico Zini: tenth-day-in-addis

Tenth day in Addis Procedure to check if all the services of Dream University are up and running If a machine blocks pings, use arping instead.
  1. Test DHCP:
    $ sudo ifdown eth0
    $ sudo ifup eth0
    $ ifconfig
    
  2. Test the DNS:
    # See if the DNS machine is on
    # The network
    $ ping -n 192.168.0.1
    # See if the DNS resolves names
    $ host www.dream.edu.et
    
  3. Test the gateway:
    # Ping the gateway
    $ ping gateway
    # Ping an outside host
    $ ping -n 10.4.15.6
    
  4. Test the proxy:
    # Ping the proxy
    $ ping proxy
    # Open a web page and see if it displays
    # See if it caches
    http_proxy=http://proxy.dream.edu.et:3030/ wget -S -O/dev/null http://www.enricozini.org  2>&1   grep X-Cache
    
  5. Test the mail server:
    $ ping smtp
    $ nmap smtp -p 25  grep 25/tcp
    $ if nmap gateway -p 25  grep 25/tcp   grep -q open ; then echo "It works"; fi
    $ send a mail and see if you receive it
    
To do more advanced network and service monitoring, try nagios: New useful tools seen today
wget - The non-interactive network downloader.
Special devices Example uses:
wget -O/dev/null http://www.example.org
dd if=/dev/zero of=testdisk bs=1M count=50
mke2fs testdisk
sudo mount -o loop testdisk  /mnt
Tiny little commands Example uses: Some more shell syntax Some people run commands ignoring the standard error: command 2> /dev/null this causes unexpected error messages to go unnoticed: please do not do it. What to check if a machine is very slow More VIM command mode Command mode allows to perform various text editing functions. You work by performing operations on selected blocks of text. Some common operations: Some common blocks: Examples: The best way to learn more vim is always to run vimtutor. Installing squirrelmail To install squirrelmail:
  1. apt-get install squirrelmail
  2. /usr/sbin/squirrelmail-config and configure IMAP and SMTP. In our case, since we use IMAPS, the IMAP server is imap.dream.edu.et, port 993, secure IMAP enabled and SMTP is smtp.dream.edu.et.
  3. Read /usr/share/doc/squirrelmail/README.Debian.gz (with zless) for how to proceed with setup. A short summary:
    • link /etc/squirrelmail/apache.conf into the apache conf.d directory
    • customise /etc/squirrelmail/apache.conf for example setting up the virtual hosts, or running it only on SSL
To have different virtual hosts over HTTPS, you need to have a different IP for every virtual host: name based virtual hosts do not work on HTTPS. You can configure multiple IP addresses on the same computer: use network interfaces named: eth0:1, eth0:2, eth0:3... These are called interface aliases. You cannot setup interface aliases using the graphical network configuration and you need to add them in /etc/network/interfaces:
    iface eth0:1 inet static
          address 192.168.0.201
          netmask 255.255.255.0
          gateway 192.168.0.3
    auto eth0:1
This is the trick commonly used to put different virtual HTTPS hosts on the same computer. Links squid documentation: Shell programming: Performance analysis: Setting up mail services:

Aigars Mahinovs: Spot focus

For a long time I have considered F-Spot to be a nice concept application, but not really fit to be the center of Linux digital photography experience due to general bloat and (most importantly) due to the lack of many important features that would compensate the interface lock in that this application demands. In this post I will try to list all the deficiencies and lacking features of F-Spot that I have found while using it to manage my photo flow.
First let’s talk about the bloat. I will compare F-Spot to GThumb. There are few points of comparison: first start up, viewing a bunch of photos and importing a bunch of photos. When starting up GThumb uses 17 Mb RSS memory (10 of them shared with all other Gnome programs) while F-Spot uses 33 Mb RSS memory (17 of them shared with other Mono programs, of which I do not have any). When viewing a folder with couple hundred photos GThumb uses 25 Mb RSS memory while F-Spot grows to 55 Mb RSS. On import GThumb calls gphoto that adds 3-5 Mb RSS to the memory usage, while F-Spot seems to implement some/most of the photo protocol internally and can easily grow in memory up to the size of the photos being imported (which is kind of problematic while importing a gigabyte of photos), but usually the memory usage on import hangs around 250-300 Mb and hovers around that level for some time after the import is complete. For me personally it does not make much a difference (I have 2 Gb RAM now), but conservative memory usage is still critical for a good Linux application because people expect Linux to be faster and high memory usage can slow down anything. In my opinion no photo management operation should take more then 50 Mb of private RSS memory (even importing several gigs of RAW files from the camera).
Now let me try to describe the optimal work process of a (semi)professional photographer, so that we can see what is missing in F-Spot to accommodate such work-flow and what is done right.
  1. The photographer takes one (or several) cameras, lenses, flashes, memory cars, spare batteries and tripods and goes to an event/photoshoot/modelling session/walk in the park/wedding/…
  2. He takes 3-5 Gb of pictures from lots of different angles with different cameras, different lenses on different memory cards with different settings. Most of them will be the highest quality available on the camera, usually those will be RAW images.
  3. Upon getting back to his computer, the photographer wants to drop all the data to a staging place dedicated to this event. He wants to do it fast and simple without sorting trough the photos at the moment, but at the same time he might want to split the staging areas (multiple models within one session) or join them (one model from different cameras). Sometimes he might not even have time for that and would just want to dump the data now and run to another event.
  4. After several shooting events the photographer finally has reserved the time to sift trough some of the photos from the staging area (modelling jobs first, then the friends wedding and the walk in the park as last)
  5. First the photographer decides to check if the times on the photographs are correct and discovers that at some shooting sessions one of the cameras was set to another timezone. He select all shots from that camera across several (but not all) staging areas and adjusts the time.
  6. Now he rechecks the logical groups of photos (which photos should be in which staging area) by dragging the photos around, splitting and joining the staging areas
  7. When the overall structure is clear, the photographer selects one (most important) staging area and starts working with images in that staging area not caring about any other images
  8. First he browses in full screen trough all the photos rating them in quality scores form 1 to 9 by pressing corresponding number keys. Rating a picture automatically advances to the next picture, which happens very fast because the software precaches several photos ahead for speed and displays without any flicker. Speeds in the order of 2 photos per second are expected on good enough hardware. One key operations for “view 100% zoom”, “rotate”, “view exif” and “quick note” are available. RAW images are automatically translated for preview with default settings.
  9. With couple clicks bad photos (with score of 4 or under) are selected and erased
  10. Now the photographer starts working with individual photos
  11. First step is the RAW->Jpeg conversion. An appropriate tool is brought up with default setting already applied and a preview of the photo showing up (like in dcraw). The photographer adjusts the conversion parameters (including and option to make a HDR-like effect by compressing the dynamic range of high bitness pictures). The converted Jpeg is saved as a version of the original photo and becomes the default for operations that do not understand RAW.
  12. A separate plugin is used to reduce digital photo noise from the pictures (new version)
  13. Photographer makes adjustments to the image inside F-Spot. Each modification makes a new version.
  14. Still not satisfied, the photographer starts Gimp from inside F-Spot and make further edits. Each time Gimp saves the file, F-Spot makes another version.
  15. The photographer erases some versions of the picture and also joins multiple near-duplicate shots into one picture as versions of that picture. One version is always marked as the top version and the photographer can easily change it.
  16. The good photos are tagged and imported to the main collection
  17. A subset of the photos is exported to: Flickr, personal Gallery installation, plain html photo album, a zip file with small (1024x…) versions of the photos, … Only the top versions of photos are exported. If unconverted RAWs are top versions, then they are converted to Jpeg with default settings. In most cases photos are also downsized before export according to the preferences. Highest quality downsizing is used (anti-aliasing) and also additionally small unsharp mask is run on each photo
  18. The photographer does advanced searches and advanced tag selections to select and display or export subsets of his main collection
  19. The photographer has three instances of F-Spot: his laptop, his main work PC and a backup hard drive that can be attached to either of them. He needs to keep his F-Spot photographs synchronised between the three locations for backups and for distributed work. Also after some point the main photo archive becomes too big to store it (with all versions) on the laptop or even on the main PC, so the photographer selects a set of older photos and selects an option to archive them. The next time a connection is established with the backup drive, all versions of archived photos are copied to the backup harddrive and the laptop and the main PC only keep 90% quality Jpeg format picture of the top version of each photo downsized to exactly fit the display resolution of the device. If even that takes too much space then “Archive Only” option is selected which insures that the backup harddrive has the copy of the photo and then erases it from primary data stores completely.
  20. When the backup harddrive is connected it is also very simple to make DVD/HDDVD/Blueray backup copies of subsets of photos from the archive with all the metadata and versions in such a way that other software (and even dedicated media devices) could easily browse the top versions of photos directly from the backup media. Of course, restoring from such backups also must be tested.
So, to summarise, the changes needed for F-Spot are: As you can see, many of those issues are already reported to F-Spot bugzilla, but have recieved little attention. So what shall we do about it?

30 July 2006

Matt Brown: Telecom Hasn t Changed

As I predicted on the 27 of June Telecom hasn’t changed a single bit. All their rhetoric about embracing the new competitive environment and voluntarily separating themselves has been posturing and PR as evidenced by the following article in this mornings Computerworld. Basically Telecom is saying Xtra is a brand, not a separate business unit, so it will continue to receive services in a different (favourable) manner to every other ISP. The only hope now is for the Government to actually muster up the courage to enforce a physical separation on Telecom… We live in hope.

Andreas Metzler: switched to postgrey

As greylistd does not seem to be developed anymore and I wanted to have --auto-whitelist-clients I have switched to postgrey. I am using postgrey-integration into exim4 written by Guy Antony Halse with some minor changes to minimize the differences to my greylistd setup. - I greylist on /27 instead of /24 networks and will immediately reject invalid recipients instead of greylisting them. postgrey runs with --unix=/var/run/postgrey/socket --retry-window=4 --lookup-by-host --auto-whitelist-clients=10 --exim.
  defer
    log_message = greylisted host $sender_host_address
    !senders = : postmaster@*
    domains = +local_domains : +relay_to_domains
    !hosts = /etc/exim4/no-greylist-hosts
    !authenticated = *
    verify = recipient/callout=20s,use_sender,defer_ok
    set acl_m3 = request=smtpd_access_policy\nprotocol_state=RCPT\n\
                 protocol_name=$ uc:$received_protocol \n\
                 helo_name=$sender_helo_name\n\
                 client_address=$ substr_-3:$ mask:$sender_host_address/27 \n\
                 client_name=$sender_host_name\n\
                 sender=$sender_address\n\
                 recipient=$local_part@$domain\n\n
    set acl_m3 = $ sg \
                     $ readsocket /var/run/postgrey/socket $acl_m3 \
                            5s action=DUNNO \
                      action= 
    message = $ sg $acl_m3 ^\\w+\\s* 
    condition = $ if eq $ uc:$ substr 0 5 $acl_m3 DEFER true false 
  # add "greylisted by ..seconds" header to mail which has successfully
  # passed the greylisting.
  warn
    !senders = : postmaster@*
    domains = +local_domains : +relay_to_domains
    !hosts = /etc/exim4/no-greylist-hosts
    !authenticated = *
    message = $ sg $acl_m3 ^\\w+\\s* 
    condition = $ if eq $ uc:$ substr_0_7:$acl_m3 PREPEND true false 

Andreas Metzler: switched to postgrey

As greylistd does not seem to be developed anymore and I wanted to have --auto-whitelist-clients I have switched to postgrey. I am using postgrey-integration into exim4 written by Guy Antony Halse with some minor changes to minimize the differences to my greylistd setup. - I greylist on /27 instead of /24 networks and will immediately reject invalid recipients instead of greylisting them. postgrey runs with --unix=/var/run/postgrey/socket --retry-window=4 --lookup-by-host --auto-whitelist-clients=10 --exim.
  defer
    log_message = greylisted host $sender_host_address
    !senders = : postmaster@*
    domains = +local_domains : +relay_to_domains
    !hosts = /etc/exim4/no-greylist-hosts
    !authenticated = *
    verify = recipient/callout=20s,use_sender,defer_ok
    set acl_m3 = request=smtpd_access_policy\nprotocol_state=RCPT\n\
                 protocol_name=$ uc:$received_protocol \n\
                 helo_name=$sender_helo_name\n\
                 client_address=$ substr_-3:$ mask:$sender_host_address/27 \n\
                 client_name=$sender_host_name\n\
                 sender=$sender_address\n\
                 recipient=$local_part@$domain\n\n
    set acl_m3 = $ sg \
                     $ readsocket /var/run/postgrey/socket $acl_m3 \
                            5s action=DUNNO \
                      action= 
    message = $ sg $acl_m3 ^\\w+\\s* 
    condition = $ if eq $ uc:$ substr 0 5 $acl_m3 DEFER true false 
  # add "greylisted by ..seconds" header to mail which has successfully
  # passed the greylisting.
  warn
    !senders = : postmaster@*
    domains = +local_domains : +relay_to_domains
    !hosts = /etc/exim4/no-greylist-hosts
    !authenticated = *
    message = $ sg $acl_m3 ^\\w+\\s* 
    condition = $ if eq $ uc:$ substr_0_7:$acl_m3 PREPEND true false 

Evan Prodromou: 12 Thermidor CCXIV

I agree with Destiny -- this letter from wp:Steely Dan to wp:Luke Wilson is just excellent. If only all creative property disputes were handled this way. tags:

Hot in the City tonight It's been a hot last couple of days in Montreal -- I mean, not hot like wt:California or wt:Europe but hot enough that it feels pretty bad. According to Sacr Blues -- one of my favorite books about wt:Quebec -- Montreal has the highest variation in temperature of any inhabited place on earth -- from highs of 40C in the summer to lows of -40C in the winter. We're at the high part now. Yesterday was my Primary Caregiver ("PCG") day, so I took the opportunity to take the baby for a long walk in Parc La Fontaine, under the gigantic poplars, where it's always cool and fresh. We also went for a nice dip in the baby pool. That kept things pretty nice. Amita in the park

Bonne F te Speaking of hotness, last night was the 30th birthday party for my friend Niko Ritoux. Maj and I took the opportunity to do our first evening out as a couple without the baby -- our great babysitter Julia came by with her boyfriend Antoine and took Amita June to a jazz concert at the Theatre de Verdure in Parc La Fontaine. How great is that? Anyways, we had a good night with Niko. We went to Le 2, the teensy but uber-cool bistro-bar our friend Daran co-owns. It's in possibly the most valuable real estate in all Montreal -- the corner of St. Laurent and Sherbrooke -- but it's unassuming and doesn't have that Lower Main clubbed-out fake tan feel. We had a great dinner of "international tapas" -- the little appetizers that remind me a lot of Toqu -style gourmet micro-meals -- and lots of liquor and good fun. I saw a lot of people I hadn't seen in a while -- P.E. and his girlfriend Ode, who were living in Taiwan for a long time; Fred; Daran and his new friend Annie; Joannie; and our own lovely Italian princess the Other Annie. Daran J.F. P.E. and Joannie Niko After dinner (11:30PM!) we hustled up to Bily Kun on Mont Royal and then Plan B across the street. Nicely, for a Friday night, everything was open and airy -- Montreal bars can get so damn crowded, but in the summer everyone's in Cottage Country and there's plenty of room for dedicated barflies. I'm not sure when I got home, but I think Niko had a good time. tags:

And more time Today I spent my time creating data feeds of Wikitravel content for researchers at the University of Zurich who are doing some sort of work on the reliability and development of online travel information. I can't wait to find out how their research comes out. Maj, Amita June and I went up on the Pont Jacques-Cartier tonight to watch the last event in the International des feux at La Ronde. One of the great things about being in Mtl for the summer is this months-long fireworks festival, in which national teams compete every Saturday and Wednesday night. This is the first time I've been on the bridge for the event, and it was amazing -- much louder and bigger than when we've watched from home. Amita June, of course, was dumbfounded by the fireworks -- she gawked open-mouthed through the whole thing. I thought she'd be scared by the lights and noise and the crowd, but she loved it -- reached out and pointed for each explosion, and even said ooooooooh for the big finale. She conked out on the 8-block walk home, which gave Mama and Papa a little extra rest. tags:

GPLv3 and license compatibility According to this article on Linuxworld.com, compatibility with other licenses like the Apache 2.0 is going to be a major focus of the GPLv3 development process. I say huzzah to that. Trivial differences between licenses are a shameful waste of time and energy for hackers who have better things to do. The world needs too much good Open Source software for us to waste time with license incompatibilities. Hopefully this same philosophy will bleed over into the FDL. Creative Commons made an overture for unilateral compatibility between the Attribution and Attribution-ShareAlike licenses and the FDL, which got stony silence from the FSF. It's time to start thinking of the users and playing nice with each other. tags:

Put one foot in front of the other I nearly forgot to mention: Amita June took her first step today. She's been "cruising" (walking around holding onto furniture) for about 6-8 weeks now, and she loves walking around holding onto Mama or Papa's fingers. And she's been spending longer and longer periods standing on her own -- up to about 20-30 seconds. Today, she was standing up, and she wanted to walk so I held out my finger just a little out of her reach. She extended her arm for it, then took two little steps to get to me. Ta-da! Maj and I took turns getting her to stand up on her own then walk to us. She's only got about 3-4 steps in her right now before she freaks out and sits down, but it's still pretty amazing. tags:

29 July 2006

Joey Hess: proposed transition plan for removal of dh python from debhelper

I am not happy with dh_pthon in the current state that it was (NMUed into) debhelper. It is preventing me from feeling good about or generally maintaining debhelper. This is a plan for fixing that.
  1. Transform dh_python into a perl module or program by some other name and possibly different interface, and put this in some other package(s).
  2. Modify dh_pysupport and dh_pycentral to call above so they take over dh_python's part of the work.
  3. Reduce dh_python to a no-op warning script and put on deprecation track for removal.
  4. Add a regression test to debhelper that fails if any debhelper script exceeds 150 lines, excluding POD docs. (Done in svn)
  5. If at any point the python maintainers find an approach that does not invole multiple competing implementations and that is either simple or has the complexity encapsulated into some other program, I can add back a dh_python. Until then the current mess will be Not My Problem.
  6. Be much, much, much more cautious accepting niche programs into debhelper in the future. :-(
Possible technical complications:

28 July 2006

Erich Schubert: On Amazon book scanning

Today was the first time I clicked on these buttons in Amazon that allow you to look at a few pages of a book. That is some Ajax application (which of course warned me first with some fancy schmancy Ajax popup, fading the window etc. that they only support Firefox, IE etc., ignoring the fact that Epiphanys rendering engine is, well, the same as Firefoxs'. I actually clicked the Ok button twice before it finally closed...) Anyway, what I want to share with you is a screenshot of some malfunction: Amazon look-inside disfunction So apparently they scanned the page word-by-word; often clipping the lower part (notice the missing parts of the p, g, y letters in most words). Some words have gone missing altogether (before "life"). However, the page appears to be a Jpeg image; you can see some compression artifacts around the words that are not my fault (you might need to zoom the image). So it seems like they disassemble the pages when scanning, then reassemble them to present them to the user. Sometimes messing up the background color, like in this example... interesting. Is there much data storage to be saved by merging word images and storing them only once? Are they reassembled on-demand?

27 July 2006

Enrico Zini: Tenth day in Addis

Procedure to check if all the services of Dream University are up and running If a machine blocks pings, use arping instead.
  1. Test DHCP:

    $ sudo ifdown eth0
    $ sudo ifup eth0
    $ ifconfig
    
  2. Test the DNS:

    # See if the DNS machine is on
    # The network
    $ ping -n 192.168.0.1
    # See if the DNS resolves names
    $ host www.dream.edu.et
    
  3. Test the gateway:

    # Ping the gateway
    $ ping gateway
    # Ping an outside host
    $ ping -n 10.4.15.6
    
  4. Test the proxy:

    # Ping the proxy
    $ ping proxy
    # Open a web page and see if it displays
    # See if it caches
    http_proxy=http://proxy.dream.edu.et:3030/ wget -S -O/dev/null http://www.enricozini.org  2>&1   grep X-Cache
    
  5. Test the mail server:

    $ ping smtp
    $ nmap smtp -p 25  grep 25/tcp
    $ if nmap gateway -p 25  grep 25/tcp   grep -q open ; then echo "It works"; fi
    $ send a mail and see if you receive it
    
To do more advanced network and service monitoring, try nagios:
New useful tools seen today:
wget - The non-interactive network downloader.
Special devices:
  • /dev/null:
    • On read, there is no data.
    • On write, discards data.
  • /dev/zero:
    • On read, reads an infininte amount of zero bits.
    • On write, discards data.
  • /dev/random, /dev/urandom
    • On read, reads random bits.
    • On write, discards data.
    • Difference: /dev/random is cryptographically secure, but it can hang waiting for system events
Example uses:
wget -O/dev/null http://www.example.org
dd if=/dev/zero of=testdisk bs=1M count=50
mke2fs testdisk
sudo mount -o loop testdisk  /mnt
Tiny little commands:
  • true - do nothing, successfully
  • false - do nothing, unsuccessfully
  • yes - output a string repeatedly until killed
Example uses:
while /bin/true; do echo ciao; done
Using /bin/false as a shell
yes   boring-tool-that-asks-lots-of-silly-questions
Some more shell syntax:
  • 2>&1 Redirects the standard error in the standard output
  • 2> Redirects the standard error instead of the standard output
Some people run commands ignoring the standard error:
command 2> /dev/null
This causes unexpected error messages to go unnoticed: please do not do it. What to check if a machine is very slow:
  • See if the ram is full:

    $ free
    
    If it is, you see what are the fattest programs using top, pressing M to sort by memory usage.
  • See if there are lots of programs competing for CPU:

    $ top
    
  • Check if you have I/O bottlenecks:

    $ vmstat
    
    (but I don't know how to read it)
  • For a desktop on older hardware, you can try xubuntu instead of ubuntu

More VIM command mode Command mode allows to perform various text editing functions. You work by performing operations on selected blocks of text. Some common operations:
  • y: copy ("yank")
  • p: paste
  • P: paste before
  • d: cut ("delete")
  • c: change
  • i: insert
  • a: append
  • .: repeat last operation
Some common blocks:
  • w: word
  • : paragraph
  • left and right arrow: one character left or right
  • up and down arrow: this line and the one on top or below
  • f letter: from the cursor until the given letter
  • v: selection
  • V: line selection
  • ^V: block selection
Examples:
  • yw: copy word
  • dw: cut word
  • yy: copy line
  • dd: cut line
  • V (select lines) y: copy a selection of lines
  • V (select lines) d: cut a selection of lines
  • p: paste
The best way to learn more vim is always to run vimtutor.
Installing squirrelmail To install squirrelmail:
  1. apt-get install squirrelmail

  2. /usr/sbin/squirrelmail-config and configure IMAP and SMTP. In our case, since we use IMAPS, the IMAP server is imap.dream.edu.et, port 993, secure IMAP enabled and SMTP is smtp.dream.edu.et.

  3. Read /usr/share/doc/squirrelmail/README.Debian.gz (with zless) for how to proceed with setup. A short summary:

    • link /etc/squirrelmail/apache.conf into the apache conf.d directory
    • customise /etc/squirrelmail/apache.conf for example setting up the virtual hosts, or running it only on SSL
To have different virtual hosts over HTTPS, you need to have a different IP for every virtual host: name based virtual hosts do not work on HTTPS. You can configure multiple IP addresses on the same computer: use network interfaces named: eth0:1, eth0:2, eth0:3... These are called interface aliases. You cannot setup interface aliases using the graphical network configuration and you need to add them in /etc/network/interfaces:
iface eth0:1 inet static
      address 192.168.0.201
      netmask 255.255.255.0
      gateway 192.168.0.3
auto eth0:1
This is the trick commonly used to put different virtual HTTPS hosts on the same computer.

26 July 2006

Erich Schubert: Double your X5 battery lifetime

... at least when running rockbox. ;-) [Update: 15 hours, my > 1 year old regular X5, starting at a measured level of 91%, but which increased to 94% first ;-) So the battery lifetime gain is pretty much the factor 2.5] [Update: the X5 is sold as having 14 hours of runtime; which usually is a too high value, and measured with 128 kbit mp3 - I'm using lots of oggs, and mp3 up to 320 kbit; so I think the rockbox firmware actually uses less power than the official one!] So far, the biggest drawback of using the opensource Rockbox firmware on the iAudio X5 was battery life. I got only about 6 hours out of my X5. However, current CVS versions include a patch to solve this - apparently it powers down the USB OnTheGo chip and maybe the radio chip, too. Saving huge amounts of power. The unit also doesn't get warm anymore. My battery benchmark is still running (somewhere around 12 hours now I think); and in the forums, users have reported battery lifetime of 30 hours for the X5L version. So if you are already using rockbox you might want to upgrade; if you have been kept back by the bad battery performance - it's time to switch to rockbox now, and get all the goodies you've been missing for so long! That is: gapless playback, crossfading, album art, next song information, bookmarks, quicker startup, playback resumes where you powered off etc. I think I read about some audioscrobbler/last.fm plugin, too. Apparetly most iPod models are also supported, and rockbox has Ogg Vorbis support... one of the reasons I bought the X5 was vorbis, back then.

Evan Prodromou: 8 Thermidor CCXIV

Yesterday was such an insanely long day -- we woke up in a tent, had breakfast over a Treo, then released a lot of software and went to sleep in the middle of the night. It seemed like 4 days, not 1. And this morning I had to take our new mini-SUV into the shop for its first maintenance checkup. For the last 6 years, I've driven a beautiful old wp:Citro n DS station wagon, but around the time Amita June was born I decided I wanted her to learn to drive on it. Maj and I decided that that meant it had to be taken care of a little better, so I put it in storage and we bought at 2005 Hyundai Tucson. (The Hyundai people here in Quebec pronounce it like "Tux-awn", to our endless amusement.) It's weird having a new car -- like, newer than 1972. Parts are not only plentiful but inexpensive. There is a selection of multiple mechanics in my major metropolitan area that can service the vehicle. And people don't point and wave when you're driving, or stop you on the street to tell you stories about how their grandfather used to drive one on their family farm. We'll be driving the car to wt:Boston next week for Wikimania 2006, so I'm glad it went to the shop. It should be in good shape for the drive -- I hope the rest of us are. tags:

Slides Speaking of Wikimania -- I'm nowhere near ready for my presentation. Jeez, how'd it get to be almost-August already? Thankfully, no one else I've talked to is really ready to talk, either... so at least I'm not the last one to get my homework done. tags:

Software The OpenID software I did for MediaWiki went out yesterday, and I got a lot of good feedback on it. OpenID requires that some state data is stored between participating servers, and the code I wrote uses the memcached client built into MediaWiki to store it. Not optimal but it works. Well, better today than yesterday, that is. There were some pretty gruesome bugs in the implementation that were only showing up for some exceptional circumstances. So I adapted the JanRain unit tests for the other storage classes to my Memcached class, and that helped a whole hell of a lot for debugging. Yay, unit testing! Some people are still having problems with the software, though. The main thing I've found is that the key-value pair output required by OpenID for its inter-server communications is sensitive to extra whitespace thrown in. Why would there be extra whitespace? I've found that a lot of PHP libraries have bits of whitespace at the end, after the closing ?>, and that will show up in the output. Whether it matters depends on how sensitive the output format is to whitespace. In the case of OpenID, the answer is: pretty sensitive. But I'm looking forward to having some more people try the OpenID MediaWiki extension out. tags:

Wikipedia's 25th of July Spot-on satire from The Onion: Wikipedia Celebrates 750 Years Of American Independence. I quote:
  • "On July 25, 1256, delegates gathered at Comerica Park to sign the Declaration Of Independence, which rejected the rule of the British over its 15 coastal North American colonies," reads an excerpt from the entry. "Little did such founding fathers as George Washington, George Jefferson, and ***ERIC IS A FAG*** know that their small, querulous republic would later become the most powerful and prosperous nation in history, the Unified States Of America."
Does the fact that I find an Onion article funny say more about my declining humor standards, or about their recent improvements? I don't know. tags:

Four ideas I was very interested to see Tim O'Reilly's Four Big Ideas About Open Source. I think that there are some fascinating developments over the last few years that have fallen under the rubric of wp:Web 2.0, and I think they affect those of us who put our hearts and minds into Open Source software. I think this was part of his keynote at OSCON 2006, which, y'know, I'm not techically at or anything. It briefly crossed my mind, but I've got too much to do for Thermidor and Fructidor to flit off to yet another conference -- this one only tangentially involved with what I do for a living. Still, it's interesting that Open Source software and Web services are crossing paths. FLOSS has been critical for making Web services possible, but taking that up to the meta-level and seeking the same freedoms from Web apps that you expect from "regular" software... that's a Moebius strip of rights right up in there. tags:

My life as a toolbar So, sometime in the last year I started installing Firefox toolbars. The main one that's useful to me is Chris Pederick's excellent Web Developer Extension, jam-packed with little tools that make my job as a developer that much easier. But I also install, well, pernicious toolbars. Judgemental toolbars. Toolbars that make me forget what really matters and turn the Web into a horserace or a highschool popularity contest. They're horrible, and they're addicting, and I can't stop using them. The Google Toolbar has some diddly little useless gadgets that I don't give a shit about, like searching my Gmail account for the given search terms (whoopee). What I loooove, though, is the wp:PageRank indicator. PageRank, of course, is the patented algorithm developed by Google founder Larry Page to estimate the importance of a page on the Web. It's incredibly accurate and valuable and though no longer the only criteria Google uses for ranking pages, it's still critical as a measure of the intrinsic value of a page. So, there's this little wp:progress bar on the Google Toolbar that shows the PageRank of any page you're looking at. It's an apparently logarithmic scale from 1-10, with the number showing up in a popup tooltip. Creative Commons? 9/10. Ted's story about the great worldwide race? 2/10. Technorati home page? 8/10. Male Secretary? 6/10. Wikitravel's France discussion? 3/10. And so on and so on. Even worse is the A9 Toolbar, which (again) has a whole bunch of bogus boring features, but also shows the Alexa ranking of any site you're looking at. Alexa ranking isn't some egghead hooty-tooty algorithm about the importance of a page -- it's a ranking on the Big Board of who's the most visited site in the world and who doesn't matter in the slightest. So, I can see that Flickr is ranked #41 today, le Sans Fil is #347,296, and wikiHow is #2248. Alexa is a lot more coarse-grained than Google's toolbar -- it measures the traffic to a given second-level-domain, not a particular URL. So any LiveJournal or Blogger site gets LJ's entire Alexa ranking -- not very useful. Still, I've taken to thinking almost entirely in terms of PageRank and Alexa rank. It's unreasonable. Every site I go to, my eye drifts up to my toolbars to confirm my idea about it. Do I really like Achewood? Sure, but it's only got an Alexa rank around 20,000... Doc Searls's blog has a PageRank of 8, which is really impressive; but... my page for 22 Prairial (Journal/22 Prairial CCXIV) apparently has the same PageRank. Holy moly! Why could that be? (I think it has something to do with the wp:Law of 22 Prairial, but I could be wrong.) Really, putting these numbers on everything is ruining the Web for me. It's turning me into a total jerk, too. I kinda want to go back to the time when I just found stuff on the Web and didn't think, "How do I measure up?" Thankfully the Yahoo Toolbar doesn't include anything remotely like rankings... just as well. Of course, that's the reason I uninstalled it, too. I can find my way to Yahoo! Canada Greetings just fine on my own if I need to. tags:

25 July 2006

Davide Viti: FTFT

After rather unsuccessful messages on debian-boot and debian-i18n
there are still errors in level1 translations for d-i; since there's a
chance that new uploads can be made to fix those before Beta 3 is out,
I'm taking advance of this blog to ask people to spend a couple of
minutes to fix those.

so please... Fix The Fu***ng Translasions!

23 July 2006

David Nusinow: burp

What a couple of weeks.

So I went off to Europe. I had planned to meet up with Daniel Stone and many others in Paris, but fate decided to piss in my cornflakes and delay my flight out of Boston so that we missed the connecting flight to Paris. I spent the whole next day in Montreal's airport, and while I got a lot of reading about Norse mythology done, I didn't have nearly as much time in Paris and didn't get to meet up with anyone. Daniel and I will have to postpone drinking and bashing X in person until a latter date. The time that I did spend there, was great though, and I got to do some of the tourist things that I didn't get to do last time I was there. Nicole, my girlfriend, had never been to Europe, so she was thrilled to see things for the first time.

Then it was off to Munich, where I did get to spend some time with Michael Banck, who is even more awesome in person than on the internets. Michael was my sponsor in Debian for well over a year, as well as my advocate, and now we're both ops in #debian together, so it was a real thrill to finally meet up with him. He was too polite to let me buy him dinner or a drink as thanks, so I'm hoping he comes to visit so I can repay him. I also got to meet several others, including release manager extraordinare Andreas Barth, which was a lot of fun. We were in town when Germany was playing Sweden in the world cup, and Germany actually won, so the whole city was singing until dawn. Ever since I've been back I've been drinking lots of Hefeveisens and wishing that they were served in 1 liter form.

Surprisingly, since I've been back, I've had the opportunity to do some programming at work and push Free Software at the same time. A co-worker of mine recently did an experiment that got her a list of 900 genes, and she wanted to narrow that list by comparing them to another list or two, but had no idea how to get this done in a reasonable amount of time. So one afternoon I wrote a small ruby script to do this, and all of a sudden my boss is looking at me wondering what other sort of neat computer things I could whip up. I also had to start doing some statistics, and I found a test that I needed to do which Excel couldn't do, so I started learning and coding a bit of R, which is pretty nice so far. The co-worker of mine just invested $800 in a two day class on learning to use an add-on for R, which is cool because I've totally failed until now to get anyone to use Free Software in the lab. The whole thing is making my labmates look at me a little funny though, since this stuff is way out of their league for the most part.

The bad news is that a few days after I came back, I found that my laptop's hard drive started making some very bad noises. I moved my data to backup computer that I'd inherited but not really used, only to find that the backup machine was prone to weird random errors. That left me without a functional computer at home. I took the opportunity to order a new machine for myself, but for now I'm kind of stuck with a web browser at work. In the meanwhile, I've taken to teaching myself statistics, and in order to do that, I've been re-learning calculus. I find it a little weird that I'm going home at night and picking up a calculus text book in my free time.

As far as X work goes, not having a working computer has caused a bit of a problem. Luckily, just before my machine died, Andres Salomon had nearly finished work on backporting Xorg 7.1 to sarge. Afterwards, he decided that he wanted to join the XSF, so since then he's been spearheading getting 7.1 in to experimental. He's been continuing the work that I haven't been able to do lately, and I'm excited to work with him in the future. In addition, Jurij Smakov joined the team as sparc driver maintainer, and Drew Parsons is officially joining the team, bringing Xprint officially in to the XSF. So even though I haven't been able to do much, things are moving forward, which is wonderful to see. As soon as I can get set up, I'm going to keep working with Andres to get 7.1 ready to ship in December.

Surprisingly, I drink far more lately than when I had a working computer. I think something is wrong with me if working on Debian helps to keep me from seeking chemical modification.

Amaya Rodrigo: Resistance is futile

I had a nice talk with ender on the phone, and he introduced me to ccache. I quickly found a way to take advantage of it using pbuilder. Next step would be to hook that into distcc. Has anyone successfully done this? My bux fixing power will increase, as most of the time, while looking at packaging bugs, the code is seldom changed and rebuilds take for ever, helping me get distracted by Cute Overload or similar procrastination tools. So resistance is futile, these bugs will go away :)

Evan Prodromou: 5 Thermidor CCXIV

I finally got around to uploading images to my Flickr account today. Normally my Mom and Dad call me if I haven't uploaded new pictures of their granddaughter for more than 72 hours, but Dad's busy with an IPO road show, and Mom was, y'know, just bitten by a rattlesnake. So they've had other things to think about. They got me on the horn yesterday, though, and I promised I'd upload some shots from July before we go camping today. I've got a couple thousand shots up on Flickr, but most of them are private for friends and family only. I know it's kind of paranoid, but I guess it just seems more respectful to the little one to let her make her own privacy decisions with respect to her own image. Of course, I can't help leaking a few nice ones every once in a while, like Amita June in the baby pool across the street in Parc La Fontaine: Amita June in the baby pool at Parc La Fontaine What's a father to do? I've gotten used to Flickr, and my whole family and circle of friends uses it for sharing photos. It's one of my first stops on the Internet Procrastination Tour. I haven't really had as much luck with sharing video, though. I've tried a few of the video-sharing services, but none of them has worked out very well for me. I hope Flickr eventually gets into the video game. tags:

Rant and rave So, I've been using computers on a daily basis for more than 15 years. I get occasional back and arm pain, I'm very lucky in that I haven't had an wp:RSI blowout in that time -- knock on wood. I'd like to keep it that way. Most of the things I love to do and that give me creative satisfaction involve writing at the keyboard. One thing I do to try to stay healthy is use Workrave, the Gnome tool for splitting up your typing sessions into reasonable chunks. It takes over your screen and forces you to take a rest every 5 minutes or so, and makes you take a long break every hour or so. I definitely feel my best when I've got it running. However, I also find it insanely frustrating. Right as I'm in the middle of doing something, a little indicator pops up in the center of my screen flashing red and telling me to stop working. Workrave is excellent at getting in my way, like a cubicle-mate who asks you stupid personal questions just as you're getting settled in to a groove. So while Workrave keeps my hands and arms pain-free, it also keeps me at an elevated level of frustration all day. I wonder: is the advantage of keeping my typing rate slower worth the disadvantage of raising my blood pressure to the boiling point? If your computing tools are aggravating you by design, is there another ergonomic problem going on? What's the balance to be struck between physical and mental stress? tags:

Evan Prodromou: 4 Thermidor CCXIV

I finally got around to doing a kernel upgrade on this server for CVE-2006-3626, the recently-announced security vulnerability in the Linux kernel. I've been using the simple workarounds for a few days, but I got around to installing a patched kernel this morning, so I did a remote reboot to restart the server. Which, of course, hiccuped. I thought the server wasn't coming up and filed a SR with iWeb, my server host, but by the time they got to it, the server was up and running again. Sometimes it just takes time. I've got a theory that the probability of a server successfully power-cycling is inversely proportional to its physical distance from the operator. iWeb is only about 15 blocks away, so I guess I lucked out this time. tags:

WikiBios del.icio.us served up a tasty wiki treat today: WikiBios. No, it's not a project to code up a Basic Input Output System collaboratively using Wiki -- although that would be real cool. Rather, it's an effort to create biographies for every living person on Earth -- whether or not they're notable. wp:Paul Auster, in his book wp:Brooklyn Follies, described a plan for creating biographies for everyday people as a business. The idea being that people like to know about each others' lives -- their family, their friends. Memorializing someone in a biography keeps them alive and immortal in a way, yet only a tiny fraction of human beings have this privilege. I hope WikiBios takes off. It seems like a good idea. tags:

Limited single sign-on on Wikitravel So, after about a week of testing on our review site, I've rolled out a single sign-on system on Wikitravel. I'm starting with a very limited test: users of any of our language versions (English, German, French, Spanish, dot dot dot) can log in to our Wikitravel Shared repository with their account from their "home" wiki. The project uses OpenID, the URL-based SSO solution that's implemented on LiveJournal, Movable Type, Zooomr, and a few other systems. Although this trial is very limited, my hope is to allow sign-on between all the language versions of Wikitravel soon, and sign-on with external OpenID-enabled services soon after. Wikimedia, Wikia, and WikiHow admins have expressed interest in installing the [[$$vote abstain http://www.mediawiki.org/ extension that makes OpenID work on Wikitravel, so with luck we'll have some very nice Interwiki Interlogin very soon. tags:

22 July 2006

Uwe Hermann: ScatterChat - secure, anonymous, free, cross-platform Instant Messaging client

ScatterChat is a new cross-platform IM client announced by the Cult of the Dead Cow / Hacktivismo (during the HOPE conference, it seems). From the website:
ScatterChat is a HACKTIVIST WEAPON designed to allow non-technical human rights activists and political dissidents to communicate securely and anonymously while operating in hostile territory. It is also useful in corporate settings, or in other situations where privacy is desired. It is a secure instant messaging client (based upon the Gaim software) that provides end-to-end encryption, integrated onion-routing with Tor, secure file transfers, and easy-to-read documentation. Its security features include resiliency against partial compromise through perfect forward secrecy, immunity from replay attacks, and limited resistance to traffic analysis... all reinforced through a pro-actively secure design.
So the client is a "friendly-fork" of Gaim, it uses Tor to achieve anonymity, and for the crypto parts (secure messaging, secure file transfer) ScatterChat uses libgcrypt. It's a cross-platform application available for Linux, Windows; support for other OSes is planned (Mac OS X, others). You can always download the source code, of course, as it's free software. Actually, not quite. While ScatterChat itself is based on the GPL'd Gaim, it has to be GPL'd, too. However, the scatterchat-module package, which seems to contain the crypto-parts, is licensed under a custom "Hacktivismo Enhanced-Source Software License Agreement" (HESSLA) right now, which is so horribly long I didn't even bother reading it. However, the README says:
I am open to the possibility of re-licensing parts of this library to GPL, BSD, public domain, or some other license. I cannot make any promises, but I will try to accomodate reasonable requests.
I'm going to do just that, email the author and ask him nicely to change the license to some sane, well-known free software license. If you feel similar, please let the author know (hint, hint). Depending on what the HESSLA really says, it might prevent ScatterChat from entering Debian, for example. I haven't yet tried to use the application, but it sure looks like it has a lot of potential. It also seems do most security-related things right: Of course that's no guarantee that it's secure; I hope some crypto-gurus look over it soon. But at least they didn't make obvious stupid mistakes we've all seen in many other pieces of software. Anyways, I feel this is a real important project which will help lots of people (activists, political dissidents, normal people like me and you who value their privacy). Go check it out! (via Boing Boing)

Carlos Villegas: Now preloading worked (SoC 2006)

One again I've tried the preload program from Behdad Esfahbod (a result from SoC2005) but this time positive results. The cause of the difference might have been an incorrect deinstallation of parallel booting (insserv/startpar). The boot time showed a 2 second time improvement. The preload.conf parameters mapprefix and exeprefix were set to empty such that all files would be accepted. The results were compared with mapprefix being set to the directories used by some of the init scripts (strace -f initscript), adjusting the quantum time of preload (cycle parameter) and changing the position of the initscript to start just after hwclockfirst.sh. The results were the same: a 2 second time improvent. See the bootcharts here.

Next.

Previous.