Wednesday, October 31, 2007

Gutsy laptop lid tweak

I had a naggling little issue with gutsy on my laptop lid where when I closed the lid with it plugged in, the screen would turn off for a second, and then turn back on (I don't have the problem when not plugged in because I have it set to suspend when closed on battery power, which works beautifully). Thanks to the tweakfulness of linux, I was able to fix it in the following manner:

I created a file /etc/acpi/ containing the following code:

. /etc/default/acpi-support
. /usr/share/acpi-support/power-funcs

grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
. /usr/share/acpi-support/screenblank

then I made that file executable.
edited /etc/acpi/events/lidbtn

and changed


then restarted acpi: sudo /etc/init.d/acpid restart

and voila! it works. I know its missing some of the screensaver handling that was doing, but I dont really use screensavers anyways, so i guess i dont cante about that.

Network-Manager bug update

So a dev responded to my bug report by referring to some packages he had in his PPA. I installed them a couple of weeks ago, and network manager has been pretty solid for me since then. No more of this random freezing up at any rate. So now I believe te dev is waiting for positive feedback to get his patches pushed through to the real repo. So if you've had these problems, check the bug, try the packages, and post your results!

Monday, October 22, 2007

Gutsy is teh r0x0r

Well, now that I've got some experimental network manager packages installed on my laptop, I am pleased enough with gutsy that I am going ahead and installing it on my mac mini. I am even going ahead and killing the osx partition. Its all ubuntu all the time now.

The installation on the mini has given me even more reason to keep using ubuntu. When I last installed ubuntu on this mini, back in the edgy days (which i dist-upgraded to feisty), installing on a mini was a real headache. I had to do all these hacks while running off the livecd to get things working. This time around, not only is it as straightforward an install as I could ask for, but the livecd actually picked up on my 1920x1200 resolution and had compiz-fusion in all its (limited by default) glory! Better yet, I didn't pay $129 for it like I could have to keep apple's hardware up to date!

Ubuntu (and Debian) have really made Linux so easy to use and yet kept its most powerful features within reach that I have a hard time understanding why any power user would still be on Windows, given a choice. The fact that I can not only have ubuntu installed, but have all my preferences in place (just by carrying over some hidden files and directories from ~) in under an hour make using ubuntu a nobrainer. I've had windows installs that took all day, and that was before WGA started making installs even more error prone and difficult.

So, here's to open source, and a job well done with the Gutsy Gibbon. Nice work Canonical and the Community!

Saturday, October 20, 2007

New House

My wife and I, just after our 3rd aniversary, bought a house!

Wednesday, October 17, 2007

HOW TO:Mumbles Self-Destucting Messages

So I was inspired by the self-destructing messages featured in such movies as Mission Impossible, to make mumbles send me self-destructing messages:


Heres how I did it:

1. be running Compiz-Fusion (if you're on gutsy, you probably already are!)
2. make sure to have ccsm installed:
$sudo apt-get installcompizconfig-settings-manager
(or use synaptic)
3. install mumbles (there's a deb on the site)
4. now for the fun part:
-open up ccsm
-select the "Animations" item

-go to the "open animation" tab and click "add" to add a new rule and set it like:
window match: (class=Mumbles)
-once you're done, hit up repeatedly to make it the first rule

-now go to the "close animation" and do the same thing except choose "Burn" instead of "Fold"

-Thats it! since mumbles works with pidgin/gaim out of the box, you should be able to send yourself a message and watch it burn

You can adjust the durations as you please and play with setting on the effect under the "Effect Setttings" tab. I think I added more particles to the fire

Oh, but I have another mumbles tip. I had a problem with messages not appearing on top that I fixed by going to "General Options" on the main ccsm screen, selecting the "Focus & Raise" tab and making the "Focus Prevention Windows" say:
any &!class=Mumbles

Have Fun!

NetworkManager Regression in Gutsy?

After using Gutsy for another week, I have to say I am very disappointed with NetworkManagers performance. The sudden sieze-up I earlier attributed to being post-suspend has showed itself as being much worse then that. It seems random to me now. I move between access points a lot at the office and at least once a day over the last week, nm has suddenly stopped working. The network list will stop updating and picking another network will not do anything. Sometimes I can fix this by killing and restarting both nm-applet and NetworkManager (which, who names an executable like that anyways?), but other times it seems to be completely gone and I'm left using my trusty connect scripts.

I suspect that this could have something to do with ndiswrapper, so I am going to switch back to the (last time I checked) buggy bcm43xx for a while and see if the situation improves. I'm not confident that it will, however, as a co-worker is having the exact same symptoms without using ndiswrapper (I'm not sure what he's using though).

If nothing improves, then its goodbye, NetworkManager.

I've seen wicd recommended on the forums a lot so maybe I will give that a try. I also used to use wifi-radar a couple of releases ago, but had to run it as root, so that was no fun. Neither of those look as slick as Network Manager's supposed to be, anyways.

Its really too bad an application thats so essential to the usefulness of the OS is so buggy. Checking the Gutsy dev thread, it looks like my co-worker and I are not alone with out network manager gripes. I guess the fact that Gutsy's not a LTS release partially explains the lack of a resolution, but lets just hope version 0.7 makes it in to Hardy (and lives up to its promises).

Well, I was going to end this post there, but then I decided to head over to Launchpad and see if I could find my bug there. Surprisingly there were no bugs for Network Manager in the Ubuntu project, so I looked at the Network Manager project and couldn't find anything there either. Guess its bug submit time. I'll update here about how that goes.

edit: bug submitted

edit 2: evidently I'm just a big launchpad n00b, cause shortly after i posted my bug, i found a whole ton of network-manager in gutsy bugs. none of them match mine exactly yet, but many contain useful diagnostic tips. This link might get you the list, since I'm not sure how I got there...

Friday, October 12, 2007

redsox playoff dinner

my amazing wife made this for dinner:

yea thats right, thats chipotle corn chowder with a bratwurst floating in it, and then i had this to drink:

needless to say, the Sox won, 10-3, behind a stellar beckett performance, and the old Boston lineup that loves October as much as the Yanks lineup appears to fear it. Good luck beating us with someone besides C.C., Cleveland...

p.s. oaked arrogant bastard is totally worth the $17 i paid for a sixer

Monday, October 8, 2007

"Fixing" deskbar-applet in Gutsy

I noticed some complaints about the changes to deskbar-applet in Gutsy. As an avid deskbar user, I agreed that I didn't really like having it popup in a decorated window instead of a plain ol' box like it used to. But I think the backend changes stand out in a much quicker response from the applet, so I don't want to revert like some people are doing. (I know that most of the complaints in that thread had already been addressed by the time I jumped on the bandwagon, but the full window one remains...)

So, for those deskbar users on compiz missing the old deskbar here's a way to almost get it back:

1. install Advanced Desktop Effects Settings (ccsm) if you do not already have it:

$sudo apt-get installcompizconfig-settings-manager
(or use synaptic)

2. run ccsm


3. set up compiz to hide deskbars decoration
-select the "Window Decoration" plugin
-in the "Decoration Windows" field, put
any &!class=Deskbar-applet
-close ccsm

4. move deskbar applet
I noticed that if i invoke deskbar applet and move the window around before using it, when I invoke it again. So, invoke dekbar applet and use the mouse (you can use alt+left to move the now title-bar-less window) to position the window near the icon on the dock, or whereever you want it. I tried it in the middle for a little while, but didnt like it as much as the top bar.

The results

p.s. has anyone had stability issues with deskbar and tracker live?

Gutsy Gibbon thoughts

Well I've now completed the switch from Feisty to Gutsy on my work laptop and I'm *very* impressed. I installed tribe 5 on an extra partition a few days before the beta came out and I was very pleased from the beginning. Happily, Gutsy picked up on my widescreen resolution and had compiz enabled right on the live cd, which made everying look great right away. I must say that the font rendering in Gutsy blew me away. I work on this thing all day long, and the fonts on Gutsy look so much better to me then they did on Feisty that I wanted to complete my switch full time right away, but there was one big thing holding me back: suspend.

As a laptop user, suspend is *essential* to me. I've had this laptop since Edgy, and had some strange experiences with suspend. In edgy it worked for a while and then the kernel updated and broke it so I was using a non-current kernel for most of Edgys tenure. When feisty came out, it still didnt work out of the box, but I was able to wrestle it in to place and it was pretty solid, save for occasionally waking up without the onboard keyboard/mouse, but worked around this by either using a usb keyboard/mouse (which is how I use it at the office anyways), or by closing the lid and letting it sleep and then when it woke up they would usually be back.

So when installed gutsy one of the first things I did was to test suspend and I was very disappointed to see it go to sleep ok, but fail to wake up properly. There were problems with networking and some other stuff was just strange so I had to restart it. A quick look at revealed a bug in a recent kernel update with suspend and dells, so I hoped that it would be quickly resolved.

The last kernel update (.13) fixed it for me! so I now have suspend working without any tweaking on my part! While this is wonderful, it still has one small problem for me. NetworkManager sometime fails to figure things out properly when it comes back. I am still able to connect using my trusty "iwconfig eth1..." scripts, so this is only a minor annoyance, but a disappointing one. It seems to me, using ubuntu full time on a work laptop since warty that nm is one of the flakier default applications. This is especially disappointing because its such an often used application for laptop users. While I love the idea behind it enough that I still *try* to use it as much as possible, it seems just ... buggy. There are times when it will not connect to an open access point to save its life, and I can use iwconfig to connect with no problems at all. Then there are times when it fails to update the access point list when I'm moving around at the office so again, I have to use cli to connect. While this doesn't happen often enough to make me switch, it is often enough to be *very* noticeable. So far, the only problem I've had with it in gutsy is this one, but suspend is so complicated that I can't really blame the problem on network manager without more investigation. Lets hope some more full time use doesn't reveal the same flakiness I've seen with this app for so long.

My only other network comment is that I was impressed by the restricted drivers manager installing the drivers for my wifi card ok, but once they installed, performance was poor. I could only connect to any networks at 24Mb/s and networking would occasional get knotted up hard enough that a networking restart wouldn't bring it back and I'd have to restart. So I went back to ndiswrapper which I've been using for a few releases now. I was pleased to see that its got a gui (which might have been in feisty, but I'm not sure) so it made installing a breeze since I still had the .inf file on my feisty partition.

A few other items:
-on feisty I was running a patched mplayer that let me use accelerated video beautifully with compiz. Unfortunately, I haven't been able to find a patched .deb for gutsy yet, and I'm far too lazy to build mplayer myself. It would be really nice if we could get that mplayer in there by default, because I think many people are going to be disappointed without wobbly video
-its too bad that even with compositing on, wobbly windows and the cube are not, because, love them or hate them, to new users they *are* compiz
-glad to see that rhythmbox is a solid as ever, though I have yet to test its supposed .is_audio_player support
-I tried to use the new X configuration stuff to plug in another monitor and expand my desktop to it, but it broke my x even beyond bulletproof x. Luckily it stores some backups of xorg.conf, so it was still bulletproof enough for someone who knows his way around a CLI. That was a few upgrades ago, but I'll wait for the official release before trying that again.
-I think the estimated power remaining is getting confused by suspend, or this $150 battery is already going bad. (stupid dell)

All that aside, gusty was by far the quickest upgrade for me. Once I had it installed and up to date it was a matter of minutes to move over some config stuff from my fiesty home to my gusty home and isntall a few packages for stuff I use and be on my way. Nice work Canonical! Once the final release is out, I'll try dist-upgrading on my mac mini and see how that goes...

CUPS "hacking"

Just have a little trick I made up I thought I'd share.

I have an hp something-or-other printing that does both photos and paper. It installed nicely on the xubuntu box in our bedroom, but I have a mini running ubuntu with a nice big screen in the living room, and that's where we manage our photos. Its nice to have it in the living room because you can be all social and show off pictures and the like, but I got the mini and a flatpanel so I could keep the clutter in the living room to a minimum. So I have the photos in the living room and the printer in the bedroom.

So I was trying to share the printer using CUPS from xubuntu in the bedroom to ubuntu in the living room, but I was having a problem I wanted to be able to switch between using regular paper or photo paper from the living room, without going through the cups interface. (I like to make things nice and simple for my wife so she sees the advantage of linux over windows). As I was trying to get things set up I noticed that not all applications have the same printer interfaces. Some of them, like the gimp, have access to all the printer settings of the shared printer and you can choose the output from the print dialoge, but others don't have this built in, and even when it is built in, its a rather overwhelming dialoge. I wanted to be able to just pick print and hit go without having to worry about settings.

I did notice, however, that most of the print dialoges had a way to choose a default printer and that when I installed the printer in the bedroom, I was able to set default setting for it. So, while telling myself how smart I was, I added my printer twice to the server, once named "paper" with the paper tray as the default source, and once called "photo" with the photo tray as the default source. Then in my photo management application I set photo as the default printer and in openoffice, gedit, and firefox I set paper as the default printer. Now everything "just works". My wife can print documents, websites or photos without having to glance at any complicated printer dialoges.

Not that groundbreaking, I know, but hopefully someone will find it helpful.

Wednesday, October 3, 2007


I'm currently helping a couple of coworkers switch over to Ubuntu, and I just realized that I forgot to tell them to install sshfs first thing. Sshfs is my #1 reason for being on linux. If I had to give it up, I wouldn't be able to do my job and stay sane. (I'm a developer). It basically make the entire internet (well those boxes you can ssh to, anyways) an extension of your harddrive. The reason I forgot to mention it is that its so easy to use, I almost forget I'm using it. Anyways, if you don't know what it is, check here.

The fuse project has some other pretty cool applications as well. One of them I just found out about is MythTvfs, which lets you mount a mythtv backend and browse stored shows easily. As myth stores its shows with cryptic filenames, this is a huge tool for programs (or people) that don't know how to interface with mythbackend. It looks like its a little more difficult to get running then sshfs, but I just need to set aside some time to get it installed.