Devil’s Pie
December 9th, 2009
I’ve been using Gnome for almost a year and a half now, and while I have grown to love a lot of the advantages it has, there are still some things I miss about FVWM. From a keyboard shortcut standpoint, many of them were alleviated when I discovered Gnome Do. However, I still found myself missing sticky, transparent shells that would give me a constant view into certain data, be it htop or tailing some files. It was really quick to set up in FVWM, but I had trouble finding a way to remove window decorations from windows in Gnome.
Sure, there are other ways to get the data I’m looking for, but having text rendered directly on the desktop like that just looks damn cool to me. It also intimidates the crap out of non-geeks when they see my office, which I fully admit is a big plus.
I came across a package called Devil’s Pie that gave me a lot more control over windows. Although I was looking for something that would let me actively select a window to give it certain properties (sticky, no decorations, etc), Devil’s Pie instead passively detects new windows and applies settings to them. It’s a mentality shift from my initial thoughts, but I think over time this model will actually be really useful. Plus, it has “pie” in the name, which is just awesome.
With a combination of gnome-terminal profiles/flags and Devil’s Pie configuration, I was able to get my desktop to automatically populate my desktop with all sorts of data. The following description of how is kinda wordy, but it’s really not complicated at all.
Install and Configure Devil’s Pie
sudo yum -y install devilspie mkdir ~/.devilspie touch ~/.devilspie/console.ds
Devil’s Pie reads all configuration files (I believe they have to end in .ds, but don’t quote me on that) in the above directory on startup. Those files define the rules that will be applied to new windows that are created (there’s also a way to ask it to apply rules to all existing windows as well). For this example, I put my rules in a file named console.ds.
(if (contains (window_name) "console" ) (begin (undecorate) (pin) (skip_pager) (skip_tasklist) ) )
There are two main parts to the above configuration. The first is the matching expression to decide if a window should have the rules applied. In this case, I indicate to apply the actions if the window name contains the string “console” (there are also options for “is” and “matches”). I’ll cover where that rule comes into play in a bit.
The actions do the following:
- undecorate – This is primarily what I was going for, I want the window decorations removed. This includes the title bar and border, though you can still use the shortcut key (alt+F8 by default) to resize a window without decorations.
- pin – Make this window available on all workspaces. There are also attributes to control putting a window on a particular workspace, which could be useful in my case since I use 12 workspaces and am, well, pretty anal retentive about having certain applications in certain workspaces.
- skip_pager – Don’t let the window show up in the pager. It removes the clutter in my pager since I don’t consider this a “real” application, just a status-type window.
- skip_tasklist – A little more useful than skip_pager, this keeps the window off the taskbar, for the same rationale as above.
Needless to say, I’m only scratching the surface of all of the actions supported. I haven’t found a good way to find this list yet; the man page says the -l flag will list symbols but when I try it, it just doesn’t do anything.
Run Devil’s Pie
devilspie
Not much to say about that. I’ll talk more about enabling a debug mode later, but I mention it now to say it’s not done through flags. You’ll need to restart it every time you change your confguration files, but once you’re set add it to System -> Preferences -> Startup Applications and you’re good to go on reboots.
Create Gnome Terminal Profile
To summarize above, Devil’s Pie will take care of removing window decorations and keeping it on the visible workspace. We still need to configure Gnome terminal to add some slickness to how it looks. Since I don’t want this slickness on all of my terminals, I created a new profile named “console” with the following changes:
- Background – Transparent background, with the slider set all the way to none.
- Scrolling – Scrollbar is: Disabled
That gives us a completely transparent shell, reflective of its use to simply throw data at me.
Start the Terminal
Now we just need to make sure we start the terminal such that it will use the right profile and will trigger the window detection from Devil’s Pie. Here’s where the matching expression from above comes into play. I don’t want all of my terminals to have no decorations, just specific ones I want to treat in this fashion. When starting the terminal, tell it to use a specific window title that will match our Devil’s Pie rule from above.
gnome-terminal -t console --profile=console --geometry=140x20+1680-0 -e htop
A quick explanation of above:
- -t – Sets the title of the terminal window. This value should match up to the window_name value from the Devil’s Pie configuration.
- –profile – Tells the terminal to use the slick console profile in all of its transparent goodness.
- –geometry – Initially size and place the terminal on my screen.
- -e – Run a specific command when it starts, in this case
htop.
My screenshot above simply uses a similar call to gnome-terminal, passing a tail command to -e and different geometry to get the log tail on the top of the screen.
Two other notes on Devil’s Pie:
There is a UI for editing the configuration files: gdevilspie. It’s handy because you can easily see the different types of matching expressions and actions, however the files it generated didn’t run for me. For some reason, even with one matching expression it still added a blank condition and an “and” statement and closed the conditions block too early. I haven’t looked to closely yet to see what is wrong.
Enabling debugging is as simple as adding another configuration file. I added one named “debug.ds” to my ~/.devilspie directory that contained simply:
(debug)
Once that is in place, running the devilspie executable from the command line output some really useful window information whenever a new window was created.
It Just Worked
November 29th, 2009
I’m a bit late on any sort of post about Fedora 12 being released. That’s not to say I haven’t been taking advantage of it. On release day I did a clean install of my main desktop. From start to finish, I went from booting into the x86_64 install disk to building and running RHQ in about 70 minutes. That includes dual monitor support with no manual steps on my part and sound support. I even plugged in a tablet input I have and it picked it up without an issue.
That’s it. I ran through the installer, added a few packages I use that aren’t part of the default install, and was back up and running (I intentionally didn’t upgrade just to use it as an opportunity to clean off all the random crap I collect over the lifespan of an OS install). I literally did it during a conference call at work. The installation and initial experience has gotten extremely streamlined.
Over the weekend, I decided it was time to attack my wife’s laptop. She’s been using one of my old laptops for about a year and a half now which was running an older, non-updated version of Ubuntu (probably 8.04). After a quick backup, I popped in the i386 install disk to the same result as on my desktop: it just worked. I typed in the wifi password and she was good to go.
My wife is still a die hard Quicken user. She took extremely well to Linux when I first pushed it on her, but I have yet to mentally prepare myself to argue the accountant in her to move off of Quicken. So as part of this laptop install, I setup a dual boot into Windows (the hardware isn’t beefy enough to run it as a virt guest).
I figured I’d push my luck. I popped in the Quicken CD, pointed wine at the installer, and hoped for the best. 5 minutes later, it was installed. A few minutes after that, it had successfully updated itself from the internet and there was a menu item in Gnome for her to access it.
The worst part? Midway through the installer I called my wife over to show her. Here on her Gnome desktop sat the Quicken Windows installer. I didn’t have to do any sort of odd config file hacking, nor did I have to sacrifice any small furry animals. Her reaction?
“Cool.”
I just kinda stared at her blankly for a minute. It was almost physically painful to see her not appreciate the technological awesomeness that stood before her. I sighed and grabbed my phone intent on texting someone who could appreciate the situation.
Congratulations to the Fedora team on an awesome release. There have been some seriously great improvements in what have historically been uglier areas, such as wifi and dual monitor setups (not to mention the fact that I’ve always been cursed when it came to wine).
Gobby – Free Collaborative Editor
November 22nd, 2009
Despite the fact that the team I’m currently on only has around 8 people, we still manage to span three different time zones. Needless to say, it’s not exactly simple for us to gather around a whiteboard and hash things out. With our move to using agile process techniques (more on that in other blog, it’s a beefy topic), we had a monthly need to be able to work on user stories and tasks together. For a while, we tried frequent saving to a single wiki page, but that had a few obvious limitations.
After experimenting with a few different approaches, we found ourselves regularly using gobby. I took the post title directly from their site, but it doesn’t do justice to just how fluidly it all comes together.
Gobby lets everyone logged into a gobby server type at the same time on the same document. Ugh, even that doesn’t showcase how cool it works in practice. The changes are sent in real time to every user, which both provides a very seamless collaboration environment as well as lets my teammates know just how bad I really am at typing (I’m even worse when I realize other people are watching me mistype every third letter).
The screenshots on their site are a little small. And frankly after trying to take one myself, I realize why: text doesn’t shrink well. Anyway, I tried to take one from our last sprint planning meeting to give an example of what I’m talking about (click on it for the full sized version which looks a bit better):
Each person who logs into the gobby server chooses their own background color. Whenever a user types something, those changes are highlighted in that user’s color, which (in our case at least) is less about ownership and more about differentiating changes. Again, realize each user can simultaneously type in the same document, which leads to an incredibly collaborative environment. And yes, seeing a document come together in different colors like that just plain looks cool.
Future Red Hat Developer
November 18th, 2009
(Renamed from “Future Fedora Ambassador” because of the hat… not that she can’t be involved in both, but this picture happens to be Red Hat specific
)
It’s been a while since I got a good picture of my 2 year old geeking out. My wife actually took this one after my daughter found my red fedora which was still packed from moving.

Home is where you hang your fedora
November 17th, 2009
Damn, that title would have been a lot more fitting if I actually had my red fedora in my office somewhere. It’s still packed from the move.
A coworker is looking to clean up his home office and asked me about my setup. After 3 years and as many different rooms, it was a good opportunity to look back and think about how it’s been going.
I posted a few pictures in my last blog.
We have an “office” room on the first floor, but that was immediately out of the question due to the sheer amount of foot traffic on that floor. So instead I use the smallest of our spare bedrooms. Having a door to close is a requirement when you have kids. Or a stay at home wife. Or both.
I use my home desktop/monitors, a dual core 8GB fedora box, which is soon to be completely rebuilt as F12 (I upgraded from F10 to F11 and it always felt a bit dirty). I have my guests on there and do 99% of my dev there. It’s configured for the Red Hat VPN, but I rarely have to connect to it from that box.
I also have my work laptop in there, using synergy to use the same keyboard/mouse on them. That stays on the VPN when it’s not being unceremoniously punted off of it and mostly handles chat and e-mail. I’ve gotten into a routine of trying to make sure my desktop code is committed before I have to go to campus so I can just update and have my laptop in sync. That’s not always possible in which case I pretty much just rsync my source tree over. Once this semester ends at Villanova this will be less of an issue since I’ll rarely be working only from my laptop.
Since those are my primary two machines, I have experimented with an external network drive as a way of sharing stuff (I also use it for a bunch of different things). It’s worked, but I wouldn’t say it was necessary to my setup.
That’s the only desktop in my office, the rest are in the basement. Having the door closed most of the day results in some grossly stale air circulating (insert fart joke here), even with a ceiling fan. More desktops just leads to unbearable heat and a tropical climate in my office. I bought a cactus when we moved in (you can’t see it in the pictures, it sits on the desktop). I’m using it as a canary of sorts; if the cactus dries out, I really need to entertain a new solution.
My Red Hat supplied desktop along with a handful of older boxes I have are in my basement. I have a wired connection from my office to the basement; in the old house I figured out a way to run it myself but in the new house I leveraged the fact that our phone lines were run using cat 5e. 99% of the time I can get away with using SSH to them, VNC in worst case. I’m almost finished with the wiring I need to do in the basement, at which point I’ll have all of those boxes on a KVM to a spare monitor down there for the rare occasion I need to actually be at the box.
Only annoyance? Having to run downstairs in the morning to power them on, though I may finally look into network booting for the cool factor.
Ergonomically, the biggest issues I’ve faced are related to lighting. I’ve had to play with monitor position in relation to the windows and background light for the monitors. In the new office, it hasn’t been an issue; the light on the ceiling fan is actually very good for my purposes. The nice part is that, unlike a corporate office, I have 100% control of your decisions on what to do about it and don’t have to deal with SOX stuff.
I’ve also found a need for having a downtime after work, something that used to happen during the commute home. I can’t just walk out the office door and immediately be husband/father. It’s like switching gears without a clutch.
Most of the time I’ll sneak into my room and just watch TV for 10 minutes. Other times I’ll run an errand or go to the gym if I didn’t go at lunch. But in my experience, I don’t do well when going straight from office desk to dinner table.
That’s largely been the work at home experience so far. Going forward, I’m curious to see what it’s like having my gaming rig in here. All kidding aside, I’m not worried I’ll be tempted to play during work. It’s more that if I’m really into a game that will mean I’ve spent a good 90% of my waking hours in the same room and frankly, the door isn’t strong enough to prevent my wife from kicking it in and dragging me out and back into the real world.
New Office
November 16th, 2009
In lieu of the rantings of some of my coworkers on their new cubicle accommodations, I figured it was finally time to start blogging on some of my adventures in my new house. I still plan on writing up the details of my new prowess with all things electrical (along with the obligatory story of almost melting my face in the process), but for now I’ll stick to the topic at hand and show off where the majority of my home improvement work has gone thus far.

The actual work area hasn’t changed much from my previous house. I still use dual monitors with synergy over to the laptop, complete with Red Hat posters to (attempt) to add a level of professionalism…

… which doesn’t last too long once you start to look around. This desk houses my gaming rig. Having it in my office has revolutionized boring conference calls. Above it is a corkboard showcasing the artistic stylings of my 2 year old.

Yes, those are the Left 4 Dead campaign posters. They look even more epic than I thought they would.
Not shown is the single greatest addition to my office: the ceiling fan. I even tempted fate by installing fan controls to the wall switch, which is somewhat irrelevant since it’s a rare occasion that I don’t want it set to the “hurricane force winds” setting.
Comment of the Day: Gulp
October 12th, 2009
PageControl pc = PageControl.getUnlimitedInstance(); // gulp - I assume we can fit all package versions in mem
It’s been a while since I’ve come across code that talks to me. Even longer since I’ve seen code emote to me. The good news is that, so far at least, we haven’t had an issue with package versions in memory.


