Linux Window Placement is Unproductive

2009-10-21 15:25 - Linux

Unix has a long-steeped tradition and philosophy which I normally agree with: create small tools that work together to solve bigger problems. It works really well at the command line, with classic tools. Chaining pipes together can get quite a few things done. It's totally failed in the GUI world, however.

I'm used to how all my programs act on Windows. If I launch Firefox (or Thunderbird, or Pidgin, or EditPlus, or Photoshop, or Volume Control or ... the list goes on) and put it in the top-right corner of the screen, close it, and reopen it: it comes back in the top-right corner of the screen, where I put it! I'm extremely used to working this way. It follows the desktop metaphor very well, I put particular things in particular places, and I'm very used to looking at that particular place to find that thing. (Aside: It's one of the things I really dislike about the 30" monitor I have at work now. There's a lot of space, but I'm used to the dual-monitor setup which divides said space into separate places. But I digress.)

It seems that in Windows land, every single program implements the "remember my size and position" logic, and restores said settings next time. The exceptions, which do not do this, get launched in a "cascade" arrangement: starting from the top left, each is down and to the right by a little bit, about (exactly?) the height of the title bar. The command prompt is a classic example of this. It's not useful. But, since Windows offers nothing better in terms of window placement, every (okay, almost every) piece of software solves this problem, and basically all in the same way: launch in the same place that it was last time.

One way to make this clear is to look at Pidgin. By default on Windows, the Pidgin "Buddy List" window, and each "conversation" window launches in the same position it was in last time. On almost every computer I use, for me that is the top-right and bottom-right corner respectively. I usually keep at least a bit of those corners visible at all times, and can easily switch to those windows with the mouse (see Fitt's Law: stuff on the edges, and especially in the corners (both edges) is really easy to get to with the mouse), and can see when something is going on in that window (or if it appears suddenly). And on Windows, this works. On Linux? Not so much.

See, Linux follows the Unix tradition, and things are often built in small cooperating pieces. So the GUI system as a whole delegates to the window manager ("software that controls the placement and appearance of windows within a windowing system in a graphical user interface") all the work of placing, sizing, and interacting with the actual windows holding the programs. As a result people who write Linux software (even cross-platform capable software) seem to think along the lines of, "Pidgin doesn't place the window, it is up to your window manager to decide the position."

But the window manager manages the windows horribly! First, I have to install a package that doesn't come by default (CompizConfig Settings Manager, aka ccsm) to get to the "Place Windows" setting. The choices are cascade, centered, smart, maximized, and random. What do these settings do? Starting from an empty desktop, and opening a few different programs, I see:

Cascade
Starts at an inconsistent position, near but not at the top-left corner. Following windows go in a column downards, the left edges aligned, until the vertical space is consumed. The next columns start at the same vertical position as the first window, unless this window is taller than the first window in the previous column, in which case it starts at the same vertical position as a lower window in the previous column. (The top-left corner of the new window starts at the bottom-left of a previous window if possible, otherwise at the top-right corner. Once neither are possible, the scheme starts over at the top-left of the whole screen. Each new window goes in the "first" available space.)
Centered
Every single window starts perfectly centered in the screen, all on top of each other.
Smart
Each window goes as far towards the top-left corner as it can, without covering any other windows. If there is no empty space big enough to hold it, it goes wherever it covers the most empty space (the desktop) and the least other windows possible.
Maximized
Every window takes up the entire screen.
Random
Just what it says on the tin. A surprise every time you open the window! Where will it go this time?!

So what are the merits of these schemes? They all stink! Well, I can sorta see the value of maximized on a small screen (netbook). But there are still certain apps (calculator, IM, etc) that have a smaller window and are just fine that way. Cascade is very difficult to predict (look at the description!) and is generally useless unless you're starting a whole bunch of the same program, in which case it will set up a nice grid. But that grid will be offset from both the top and side of the screen, wasting space.

Centered is pointless unless you enjoy spending your time rearranging your windows so that you can see them. Random is just as pointless for (nearly) the same reason. The chance that the window goes where you want it is virtually zero.

Smart is what is left. In certain, rare, cases, it's very useful! When I launch that one-off program, I probably do want it to not overlap anything. I might be firing up a calculator, and want to still be able to read the web page/document/etc that I'm getting the numbers from. But it fails miserably for the programs that I use every single day, and probably multiple times in every day. I want those to be in a particular place, and I want it every time.

As mentioned, it's the viewpoint of (some!) programmers that the window manager should be managing the windows, so i.e. Pidgin leaves me stuck. There is a workaround in the "Place Windows" plugin. But it reveals the reason that the program, and not the window manager, should be responsible. I can't choose carefully enough where which window I want to place. The choices are limited, most programs don't expose any distinguishing information, and even if they did, one big slider from -32767 to 32767 just doesn't get me where I want to go.

Why does it work on Windows? Because Windows doesn't even try. It doesn't try to stuff all this information into a narrow difficult API. Each program knows what windows it has, and how to identify each. And it stores four simple numbers (x, y, width, height) and uses them each time. So simple and easy that nearly every program does it. But that's too tough for Linux. It's even been pointed out, numerous times:

So where am I left? I managed to hack together some rough placement rules. Not many. Some programs (Firefox) get it right. Some programs get it wrong. Both my Prism apps (mail and calendar) start in the right place, except down and to the right by the exact space that the window border/title takes up, and must be moved each time. Eclipse starts in the right place, but is always six pixels too narrow, and nineteen too short. The "smart" placement mode almost gets the rest right. But there are still quite a few cases that I get surprised with where the window ends up, based on some funny coincidence of what screen space happened to already be used, and what desktop space happened to be peeking through at the time. Sigh.

So, to conclude: Where are we and why? Window placement is better on Windows than on Linux. Because the Unix philosophy, combined with the FOSS community, has let us down. The app developers say "the window manager should handle it" They even explicitly disable their window-position-remembering code that's already there, for Linux, because in theory some other layer handles the window management. The window manager developers say "the application should handle it" and "this should be done in user space" and the desktop environment developers say "this is impossible to do in user space". All the while, the users want it and are not getting it. Everyone along the chain claims someone else should do it, and closes the tickets as WONTFIX. And the users continue to suffer. Another item in the list of things that work fine on Windows, but are painful and/or annoying on Linux.

Comments:

Linux is not an operating system
2009-10-26 21:19 - itsjareds

Linux is the kernel, not the operating system. You seem to be talking about X/compiz in particular. Just because they do not manage your windows the way you want them to, that doesn't mean that X as a whole is a less-than-competent window manager. The beauty of open source software is that you can always suggest your ideas.

You might find this article interesting: http://linux.oneandoneis2.org/LNW.htm/

I know...
2009-10-27 09:22 - arantius

I know I'm using the term "linux" incorrectly, but I'm purposely acting like a less-savvy real user. I know the difference between Linux, Ubuntu, Metacity, and Compiz. A regular user does not. At least in this context, it appears that if I install Ubuntu, there's no way (certainly no obvious way) to get a feature that I consider critical. It's as easy as running one .EXE file though, in Windows.

Your "you can always suggest your ideas" statement, however, isn't nearly so true. Sure, I can suggest it, but that doesn't remotely mean there's any chance it will happen. Take a look at my last paragraph. Many users, many times, have requested exactly this feature. But all of the different players involved (windowing systems, window managers, desktop environments, etc.) have all said "yeah sure, I see why you want that, but it's that other guys' job to make it happen." One of the points I was trying to make from the beginning is that the unix/linux way of separating concerns has failed drastically, here. Sure, on the command line, small well-functioning parts can be piped together very beautifully. But here in GUI land, the pieces aren't fitting together very well, at least for this purpose.

Finally, no: that article is worthless to me. This post, as the rest in this topic, is about my frustrations with the Linux/Ubuntu environment. In quite a few cases, like this one, it's either impossible or much too difficult to get a feature that I want. In Windows, which I'm used to, though, it always comes down to running one installer and continuing with what I really want to do. I don't want this to "be" Windows. I just want it to be possible to work the way I prefer. You might think that, being open source, everything would be flexible and customizable and easy to operate just the way I like. But it's not.

Linux vs. Windows
2009-10-29 07:55 - monkinsane

I Do agree that the window placement in "linux" sucks. But consider the pro's of running it:

  1. It is a Hell of alot more stable than Windowze.
  2. It's Free (Most distros's, with the exception of a few).
  3. Depending on which Distro you use - the HW Support is great - no need to download drivers 99% of the time. (This is true of Ubuntu 8.10 + 9.04 anyway)
  4. No Need to Reload every 3 months because your OS decides to bug out for no reason! (Hint Hint --> Welcome to windowze)

It is true that Linux is far from Perfect - But so's windows. Each OS has it's Pro's and Con's.

Linux might not be able to replace widows's place on the desktop pc market yet, But it has taken significant strides in the right direction the last couple of years.

I run UBUNTU on my work notebook - and I will never consider switching back to windows again. On the other hand I aslo run Vista at home - mostly cause I'm a gamer, and this is sadly the one area Linux isn't that great in. Sure some games do run under Wine, but no DX10 under wine.

In the end, users will use what they're comfortable with. And hopefully - one day soon - that will be Linux. Maybe then MS will re-consider their pricing on their OS when They no longer have a monopoly in the market.

NOT linux vs windows
2010-02-03 08:42 - RpD

1.It is a Hell of alot more stable than Windowze. 4.No Need to Reload every 3 months because your OS decides to bug out for no reason!

False diatribe.

Window placement is probably the single most annoying linux trait after the insane modularity of it. I call it insane modularity, because it is -not- the seamless inter-operation of tools it's made out to be. The user interface is molten, meaning icons appear/disappear, and adding/changing something requires wading through commands, terminal screens, and help pages... something the 'newbie' -still- can't easily do. Windows is the market monster for a reason... and window placement "just works". Not a fanboy, not a hater, of any O.S. (or 'kernel'). Not complaining about the price either. If it was cheaper, you'd jump for it? Monopoly? Try Apple.

Window Placement
2011-01-19 11:59 - khamer

So, first off, you don't need to install Compiz to have windows placed in your desktop. Ubuntu and Windows both have a single, default schema for window placement. They are not the same; you clearly prefer Windows choice more. I use Xubuntu (XFCE), and it has some built in configuration options to allow you to tweak window placement.

You can install other software on both Windows and in Ubuntu that will provide different behavior for window placement. Compiz does an awful lot more than just allow you to configure window placement; there's lighter apps that just move stuff around. However, the software that has the most control over this are called Window Managers http://en.wikipedia.org/wiki/Xwindowmanager. There's no shortage of these, and they provide lots more functionality than just window placement; things like window decorations, hotkeys to place or swap positioning of windows, etc. Historically, window placement is something that a window manager does. In Ubuntu, that's Metacity, in Xubuntu, that's xfwm. There's no confusion over whether applications handle it; and Desktop Environments contain window managers; the part of a desktop environment that controls window placement is the window manager.

You should have titled this article "Windows Default Window Placement Better Than Ubuntu's" or similar, because the point you're trying to argue is that Windows default placement is the best window placement available.

"Easy to configure to behave like Windows" is rarely an objective of the Linux community; perhaps you should try Xandros or one of the projects that has that goal. Ubuntu does not; they have their own ideas about useful window placement, which you may or may not like. On the other hand contrasting Xubuntu (what I use on my workstations) with Windows, Xubuntu does provide some configuration of window placement, where Windows does not. So, while Xubuntu may or may not have a "Act like Windows" check box, overall I have more control than Windows does.

As a parallel, a feature that Ubuntu (and Xubuntu) provide that I think is critical is window snapping; I think that if I move window edges together, they should line up because its clear that I'm trying to make good use of my screen space. Windows doesn't provide that behavior, and I have to install some relatively unheard of beta tray application to get the basic functionality I'm looking for.

The fundamental point that gets miscommunicated (or communicated insultingly) to Linux users who are coming from a deep Microsoft Windows background is that very few of the Linux distributions and even less of the software has a goal to emulate Windows. They have their own ideas about how to best solve problems. If you don't like their approach, you always can use Windows, or you can try one of the others in the plethora of distributions available, but its not a failing of distributions. You should step back and consider what problem you're trying to solve in the first place (why do you need window placement to save? What are you trying to do avoid?) and then look to see how the linux community has addressed that problem rather than whining that they didn't adopt Microsoft's design.

Post a comment:

Username
Password
  If you do not have an account to log in to yet, register your own account. You will not enter any personal info and need not supply an email address.
Subject:
Comment:

You may use Markdown syntax in the comment, but no HTML. Hints:

  • An empty line between text will create a paragraph boundary.
  • Use angle braces around a plain URL to auto-link it: <http://www.example.com/>.
  • Use this format to create a link with different text showing: [An Example](http://www.example.com/).
  • Use backticks (``), not leading spaces to enclose a code block.

If you are attempting to contact me, ask me a question, etc, please send me a message through the contact form rather than posting a comment here. Thank you. (If you post a comment anyway when it should be a message to me, I'll probably just delete your comment. I don't like clutter.)