Using a custom window manager with Gnome / Ubuntu 11.04

I kinda expected that the upgrade to Natty Narwhal would be a bit bumpy, but it was pretty painless. Really all I use GNOME for is a way to get a system tray into my XMonad session with the least possible fuss. I also use a few GTK+Gnome oriented apps like evince and geeqie but have no real connexion to the old Gnome.

The only real bump that I have faced, is that overriding WINDOW_MANAGER and calling gnome-session is no longer enough to run GNOME with XMonad. Ubuntu 11.04 as of current update status, is overwriting this with compiz! Not even overriding the gconf key helps, it just gets reset to gnome-wm; which is what is *supposed* to be picking up the exported WINDOW_MANAGER variable from my X session file.

Solution? Found a helpful hint on the XMonad wiki. However rather than modify things at the system level (I am a BSD lover after all), I opted to instead setup a session file in $XDG_CONFIG_HOME/gnome-session/sessions/$LOGNAME.session. The default value for $XDG_CONFIG_HOME is ~/.config, $LOGNAME is another variable for $USER (your users’ login name).


[ terry@alice ]$ cat ~/.config/gnome-session/sessions/terry.session
[GNOME Session]
Name=Classic GNOME
Required=windowmanager;panel;filemanager;
Required-windowmanager=gnome-wm
Required-panel=gnome-panel
Required-filemanager=nautilus
DefaultApps=gnome-settings-daemon;
[ terry@alice ]$

Then updated my X session to run this with commit 3e92fc91040573ba40ac20ad75a594d6eeef60b6. And for good measure, I unset the gconf key.

Now everything worky 🙂

Well, it looks like alice is now fully operational: and my fingers are adjusting to her keyboard rapidly. Fortunately, I am finding myself more often hitting fn+key in place of ctrl+key on dixie, then I am on alice. Whew.

I’ve installed Ubuntu Netbook Edition, and set it up to behave as dixie has been used all these years: a workstation rather than a terminal. I don’t have time to fiddle further with making OpenBSD play nice with Windows 7 on this rig. This does pretty much net me all that I desire: a bourne shell, decent terminal multiplexer, XMonad, Chrome, Pidgin, Dropbox, and a system tray area. I can live with the (ugh) GNU and Ubuntu parts.

The only real difference between the Desktop and Netbook editions of Ubuntu, the former comes with a customised GNOME where as the latter comes with a custom GNOME shell called “Unity“. I have really got to say that Unity SUCKS!!!!!! I seriously cannot fathom anyone getting real work done with Unity because you’ll have to set it up to do anything more useful than launch Mozilla, it feels so useless, that I think I would trade GNU/Linux for MS-DOS 2/3, and old DOS really, really did suck. Once I found the GNOME shortcut for the run dialog didn’t work, I decided instantly it would have to Go.

But to be fair, Unity does do some Very Good Things, and I commend the engineers behind it for breaking away from the Windows norm, that every GUI app tends to follow. The focus on full-screening the apps also is a feature that I like. The whole dock/sidebar thing is also quite nice, if kind of restrictive. Not even KDE4 offered as much nice “Wow, this looks integrated” kind of warm and fuzzies.

But I don’t want to take hours to try and restructure the thing, nor do I want to constantly grep programs by their menu pretty names, or have to push a button for just about every darn thing. OK, I still live in a command prompt 75% or more of the time, so sue me.

How Alice got her name

(12:58:07 AM) Noles: Project Alice?
(12:58:09 AM) Me: sh.alice // I was typing in a terminal when this window popped up
(12:58:19 AM) Noles: hmm
(12:58:26 AM) Me: alice is the hostname of this netbook
(12:58:51 AM) Noles: it is like Project Alice in Residents Evil 😛
(12:59:24 AM) Me: Part a nod to ASUS (starts with A), Alice in Wonderland (I’m nuts), and to Project Alice because this [netbook] is cool like Alice 🙂
(12:59:35 AM) Noles: heh

This morning, my mother rather piqued my technical-goat, when she said she was “Tired of my excessive computer buying”. Which of course, is an instant sequence of hash look ups in my brain:

  1. SAL1600 (desktop) was bought with a long lost inheritance and strings attached (*groan*).
  2. Dixie (laptop) was bought by my sister-in-law, so I could get work done around my mother driving me nuts.
  3. Vectra (improvised server) is currently residing in a hodge-podge of parts:
    1. Some from a gutted-Dell my brother was throwing out.
    2. Some from an old Vectra Vli8 handed down from someone we used to work for, when he heard my mother was being a bitch about letting me dual boot her (then “family”) computer.
Alice here, is the first computer that I’ve ever bought myself, not to mention it’s the cheapest computer I’ve ever had, lol. So, what the fudge is so “Excessive” about buying one computer, which probably cost me 25% or less than what hers cost? *Shrugs*
People are stupid.

This blog entry by Michael W. Lucas, has got to be one of the most impressive ways I’ve ever heard, for integrating OpenBSD in a hurry.

sshfs + svn != fast

While one of my main gripes about Subversion in the past, has always been “It’s slow”, I just found a real way to snailify it. Try running svn diff on a nice (~80M) chunk of source tree that’s mounted over sshfs.

It probably doesn’t help either, that the server has quad, quads, and  my systems a lowly dual, hehe.

Hmm, finally a chance to kick back and update my journal, before dinner ^_^. Something that’s been on my mind, is task management and record keeping, or more broadly the issue of “Productivity”.

When it comes to general coding or computing tasks, I stopped worrying years and years ago. I’m noted as a VIM user who loves its editing efficiency, and I would take something like vi or emacs any day of the week over a glorified Notepad, which is a class of code editor that excels at inserting efficiency. Likewise, I spend much of my time in a command line environment—which is far more productive for me than what most `normal` people use on their computer. Being at home in a terminal is also kind of a necessity where I work, hehehe.

So what does concern me, is at it’s essence Getting Shit Done and Keeping Track of Shit Done. Over the past couple months, I’ve extended my natural workflow to something more effective for a working environment. In the end, it’s still the same objective though, GSD and KToSD.

Traditionally, by project I would usually keep a set of notes: in the project root, either in a file called TODO or buf; which is a convenient name when your editing source code and want to write out a scratch buffer. Technical and personal notes would generally fall somewhere under ~/Documents with temporary notes and snippets in ~/tmp or ~/misc, depending on how long I need to cache it. Obviously, most of the interesting things would get converted to HTML and blogged here! My vim setup also defines an “Outline” mode that I utilize for brain storming and various other things that belong in a .outline file.

At the present, I’m utilizing a note taking program called TomBoy, which has become quite the useful notebooking tool! While it has a few things I find irksome or overly minimalist, it also has a few that I quite like, and fits the #0 rule: it just works. TomBoy is written in C# and works great on every platform I’ve tried it, including Windows. The main lack to it, is having to fumble about to find which window on screen belongs to my current note. I would like to find the time someday to write plugins for interfacing it with other software in my workflow but that’s more so for use outside of work. My systems all run the TomBoy client and utilize one of the many backends for synchronization, so I always have an up to date set, which is good because (*groan*) sometimes I may have to work from home.

What I do with TomBoy, is maintain a set of notes: the Current Action List and . Whatever is most relevant to the here and now gets scribbled into the current action list. So for example, if I’m implementing some change to a program I will have outlined the phases needed to do it as a set of bulleted lists in my Current Action List note, which is saved in a notebook named after the company I work for. During a `change of gears`, or as certain information becomes less associated to the Here And Now of what I am working on, it gets cut and pasted into a note named after the project in the same notebook—so I know exactly where to find things. If a note becomes overly concentrated, becoming more like a multi-section collection, the notes get split and prefixed by the project name. I also have a “Programming” notebok for things that are of a more general programming nature, like comments about APIs or how to use certain tools. Today I added a “Personal” notebook, which will probably gain a Current Action List note of its own someday.

An example of this workflow in practice, earlier in the month I was focused on writing code to model a problem and code to test that for correctness. Kind of like an individual Test Driven Development. But I didn’t have time to review things very well, yet I had gotten into this sweet work flow between coding, noting, and testing.  It got done and so did the code that needed to use it.

I outline what I need to do in TomBoy, using as little or as much detail as necessary, then I do it and adjust the note as necessary. It’s for insurance: in case doing X takes N*4 times as long, or I suddenly have to take a shit in the middle of something, I won’t forget to do the Xth thing. Out of convention, I prefix completed “Tasklets” with a ‘-‘ and highlight problem areas or WIP’s with a ‘+’ prefix, e.g.

     

  • – change A
  •  

  • – change B
  •  

  • + change C
  •  

  • change D

Where D is still to be done, C is giving me more overhead, and A and B have been hashed out.

This is helpful because for example, you might think of something Important(tm) that you don’t need to focus on *now* but will need to _soon_. Or at least, it is helpful to me. I’ve been doing this for a while now and it’s really meshing well. When a subject get hammered out, like A, B, C, and D all completed, tested, and committed; then I either delete the note text or transition it out of Current Action List and into Project Name. Just depends on whether or not the info needs to be retained.

Something that proved the utility of all this to me, was when I decided to take a step back and focus on examining the work I had done. So I took a couple hours to go over the programs code base, subject by subject, and making corrections as I saw preferable. To do that, I created two indented sections in my Current Action List: one for notes on application code and one for enumerating what the test cases actually cover. For each significant element that had changed during that cycle of development (probably ~50 commits), I did two things: review the test cases from the outside in, writing down what they actually tested (the assumptions), and an occasional (highlighted) comment about what needed to be tested for or changed. Then I opened the associated source code, and went through it and made any practical comments, in a form of super-short-review. This resulted in a Current Action List that looked like this:

Subject A tc ->
  * tests quux domain
    + includes ...
    + excludes ...
    + how it deals with X possiblity
  * and so on as appropriate, covering:
    + domains and ranges
    + state assumptions
    + error
    + and dealing with 'wtf was that?'
Subject B tc ->
  * ditto

Subject A ->
  Short, concise reviews
  * including comments with pointing out
  * and areas for change

Subject B ->
  ditto.

Looking at the assumptions the test cases make rather than the code it tests, showed me areas where the tests needed to expand, which showed me places that needed to be changed. To keep myself “Fresh”, I paused after each subject/module to play “Fix it” to the flaws that I found in examining the tests and code, then update the note contents accordingly. Then I moved that chunk out of Current Action List and into Project Name. So if for example, before moving onto compiling the stuff for B, I would make the corrections to A that compiling the notes had found, then cut/paste it into the note for the project. I think this is a good thing, kind of like the old UNIX guys. I think it was DMR, who once commented on writing the BUGS section of a man page, only to go fix it rather than release it.

Doing that check the tests, check the code, fix the code cycle, allowed me to cover a lot of ground fast without having to worry about keeping track of minute details. I also didn’t space out from reading to much code and writing to little, and still have it saved in case I need to reference it later.  After everything was done and I was ready to start the next phase of what I was working on, I transitioned all that stuff out of my Project Name note and into a note named “Project Name Test and Code Review”, and left a line in “Project Name” to see that file for that. Clear, clean, and simple as eating.

Two reasons I love TomBoy: it has *excellent* support for lists and indentation. It totally and completely blows away software like gmail and Word in that regard, and provides the ease of use that my outline modelet in VIM was created to fill. It is incredibly easy to manage and manipulate info in a TomBoy note, and adapt it using list or indentation structure to organize a note in such a way that you can parse it at a glance. I generally use indents for sectioning, lists for enumerations. The second thing I love, is that whenever you write the name of a note or a file path it becomes a clickable hyperlink, very much like a wiki. But unlike the majority of wiki’s it is tied to the name of an actual note (entry) rather than a SillyNamingConvention. There’s also great support for renaming notes.

The thing that TomBoy is really Not So Good At, is managing TASKS instead of NOTES. It just wasn’t designed to do more serious task stuff then a sheet of paper. Yet it is pretty damn good at the whole notebooking thing.

There is a program called Tasque but for my needs, it is much to simplisitic to be useful. In fact, Google Tasks in GMail is probably as good (and sucks). I gave Tasque a wurl because it had both a TomBoy plugin and a RTM backend. In testing that out, I found the TomBoy side of Tasque really ain’t that spectacular either. In point of fact, just integrating RTM back into my work flow as proven useful. My usage of Remember The Milk has totally gotten overhauled, and it would be worth while to someday write a TomBoy plugin to help associate their notes/tasks.

I’ve basically replaced what fixed (and standard issue) lists I had with purely “Smart” lists, letting tagging and inheritance do the organizational leg work for me. This suits me, because I can set myself a task with tags that will make it show up in each list I want it to, so e.g. a task can be in both my list for work tasks and my list of people to contact, be readily searchable, and have a way of associating notes, due dates, and all sorts of handy stuff with it. Basically all the good stuff for tasks that TomBoy lacks.

That’s the thing of it though,

  • Just Work without Kicking.
  • Let the software do the house keeping.
  • Allow me to focus on working rather than structuring
And I’m quite happy, lol.

Hmm, it seems that updating Xfce4 has borked the install—in so much as none of the panel plugins work. Xfce4 itself seems to be O.K. but I can’t even get the Xfce Menu to appear in the panel, after using the option to migrate my panel settings almost nothing works o/. Guess whoever it was on the Zenwalk mailing list was right about the new Xfce not being ready for the lime light.

Giving KDE 4.5.4 a clean shot, results in an almost two minute wait to load, before it finally crashes back out to my XDM screen. To be fair on a second run (after rm -rf ~/.kde && sudo reboot) it is closer to 1 minute >_>.

Next up, using GNOME. Less than 30 seconds for the *first* run and I had a usable desktop. At least, something in this world works. After rebooting, going from log in to a usable desktop was approximately the same time frame. That’s cool.

I have never been a big fan of the old GNOME but I will usually be the first to admit, it gets the fuck out of your way and lets you get shit done. But Xfce4 is faster!!!

So I guess for right now, the old GNOME is my defacto-standard desktop :-/. Hey, if it works. Hell, all I really use the “Desktop” for amounts to a system tray, wall paper, and a way to switch between windows. 90% of what I do, is done in an X Terminal anyway.

The thing that I do care about, is that It Just Works and Doesn’t Annoy Me Constantly.