Zenity, sessions, and window matching

Apples & Oranges - They Don't CompareIt has been pointed out that session management in Metacity is currently a bit broken. Firstly, it leaves a lot of useless files around. I assume that the only session file which is really necessary is the most recent one. Secondly, I recently found and fixed a bug where Metacity actually crashed when attempting to save a session. I wonder nobody had found it before, but maybe this shows that session management doesn’t get used, or at least looked at, very much. Thirdly, there’s still a bug in the session management that I found the other day while fixing Zenity support, wherein it tries to put up a dialogue before closing the session… and then always quits, so you can’t see what you were told.

It seems to me that session management is three-quarters of window matching, but isn’t half as useful.  It further seems to me that if window positions were remembered properly during day-to-day use, they would be remembered properly across sessions.  This seems to be a rather compelling argument for dropping session handling entirely and adding some kind of window matching in its place.  After all, it wouldn’t affect our claim to be a lightweight window manager to drop one broken feature and add a more useful one instead.

Photo © TheBusyBrain, cc-by.

5 Comments

  1. Bunty
    Posted February 21, 2009 at 2:48 pm | Permalink

    I don’t see that much overlap between session management and window matching. Session management remembers the state of each application- at the very least, which documents were open, and potentially even things like the Undo stack for each application, but certainly not just where it should go on my desktop.

  2. Posted February 22, 2009 at 11:27 pm | Permalink

    @Bunty:

    It’s true that session management also is supposed to remember the state of each application, but that’s nothing to do with the window manager. As far as the WM knows, all that’s needed is to place each window at the size and position it was at before, and on the same desktop.

  3. Posted February 23, 2009 at 2:55 am | Permalink

    I loved session management, but it seems to me broken at the moment. Some examples:

    – Epiphany didn’t restore windows automatically, but it’s own session manager starts and ask me for this
    – Tomboy starts with the search window
    – Abiword or OpenOffice didn’t remember the documents

    I really would like to see a good session management.. A “zero-conf”* window-matching sound cool, too.

    *Regarding to german ubuntu list, their seems to be crazy tools remembering and placing windows and you can setup every pixel..

  4. Posted February 27, 2009 at 11:25 am | Permalink

    Session management is not used, because it is broken.

    There is no noticeable crash, but I find that Epiphany and Firefox act as though they are recovering from a crash when I next start them after logging out with them running.

    Please, please get session management working. I have recently switched from KDE to Gnome, and it is the single feature that I miss most.

  5. Posted February 27, 2009 at 1:58 pm | Permalink

    @Graeme Pietersz:

    There’s no question that session management is broken. The question I’m considering, though, is whether implementing window matching (i.e. the windows come back where you put them, both across sessions and during sessions) would do everything that session management does and more. It would be a fair amount of work to fix session management, and perhaps this work would be more fruitfully put into replacing it with window matching.

One Trackback

  1. [...] restoration is currently broken anyway, but whether we fix that by making sessions work again or by implementing window matching, we need to make sure that z-order is restored [...]