I’m not sure why it is that so many people from one side take shots at Apple whenever they have the chance, but at the same time are totally ready to “copy” their ideas – whether or not they make sense.
You probably remember when I criticised the FatELF idea stating, black-on-white, that the idea only barely made sense for Apple as they had the knowledge and design for it already in their possession, while the required investment for Linux developers would just be unjustified compared to the positive effects to be gained by such an approach.
On a similar note, I never understood why people expected “dock-like” software to work on Linux just as well as it does on OSX. It probably has to do to the fact that they have seen OSX on screenshot, videos, maybe a local store, but never used it enough to notice how there are subtle differences between the behaviour of software between the two of them.
As far as I can see, the new Ubuntu Lucid screenshots that are being shown around the net prominently feature a “dock-like” bar on the bottom; I have no idea if that’s the default Lucid interface yet, I don’t have enough time to update my virtual machines, especially not in this moment, but I fear that if it is, they haven’t rewritten most of the software available for X11 to behave like the software for OSX does — well, most of it at least.
A friend of mine, average-time Apple user, quite the geeky kind of person, actually went as far as asking me since when Linux learnt about applications handling from OSX. As I said, I doubt it has, yet. Whether this is good or bad, it’s widely a matter of taste. Without entering a dispute that could be too long to be worth the effort, I’d like to explain what me and him are referring to in this instance. The Dock in OSX is not just a launcher for applications, it also replaces what Windows and most of the GUIs for Unix I know of call the “taskbar”, showing which
applications, windows are open… you might find here the first clue that something’s off.
On Windows, as well as X11, you have a record of which windows are open. The same software (application) can have multiple processes, each with zero or more windows, but you generally track windows in the taskbar. You get around this usually by the use of the tray icons, or notification area icons. Software like Pidgin creates an icon in the tray, you can use that to show or hide the contacts’ list window, even when no other windows are open for that application/process.
A number of application domains in the years started heavy-handedly using the notification area, or system tray, to feign a “transparent” application, running in the background: instant messengers, audio players and… OpenOffice. Both in Windows (for a long time) and in Linux (just recently as far as I can tell), OpenOffice has a “quicklaunch applet” that is basically just a system tray icon that keeps an OpenOffice process running while you have no OpenOffice document open. I’m quite sure there used to be a similar “applet” for Firefox but I don’t think it ever reached Linux, and I’m not sure whether it still exists for Windows. Recounting all the possible causes and cases for this to have happened is definitely out of my reach, but I can make more than a few (in my opinion) acceptable hypothesis.
The first starts by looking at Windows, in particular the “huge” step between Windows 3.1 and Windows 95, one I have lived myself (yeah, I have used Windows 3.1, admittedly just to play games and little more, I was too young to do anything useful with it, but I recall it as well as I recall Windows 2.1!). Applications’ windows in the older 3.x series of the interface (it wasn’t really an Operating System at the time), once minimised, went straight to the desktop – the “desktop-as-a-folder” idea that we grew so used to, at the point that KDE got quite a lot of flak for touching that idea with Plasma, is something that, unless I recall incorrectly, came from the Macintosh, and only reached “mainstream” Windows systems with 95 and later – even at 640×480 the desktop was big enough to keep visible icons for many windows (it is, on the other hand, questionable wether the computers could run as many applications, but that’s a different problem here; probably they could if they were all notepads). On Windows 95 instead, the desktop became a folder, even if a slightly strange one, and the taskbar was introduced.
The taskbar was small, and you could only open a handful of windows before their title became unreadable; at that point, things like WinAMP and other background-running didn’t look like they needed the taskbar entry at all; the system tray was also present, so they decided to have this “minimise to tray” (or “ignore taskbar” option). Given that Windows lacked the idea of daemons, and that the non-NT kernels even lacked the idea of services, all the background, or long-lasting, processes added to the trayicons. The idea became so universal that when I was toying with Borland C++ Builder (with the free-as-in-beer licenses they distributed with magazines here in Italy), there were tons of components that let you add a single extra button on the title bar: “Minimise to tray”.
The same idea then came down to Linux (in general, Unices) – because of the same taskbar/trayicon present in KDE and GNOME – even though the problem tried to be resolved by adding the group-by-application feature to the taskbar. The same feature reached Windows with XP, while the NT-kernel series – mainstreaming with the same version, even more than the previous Windows 2000 – already had services, equivalent to the Unix daemons.
Let’s look back at the other “notification area icons” (yes I’m switching terminology back and forth between Windows and Linux, for one – in my opinion – very good reason: they are the same concept, the same thing; FreeDesktop tried forcing them to be different things, but they are used in the same way, and are thus the same; Ubuntu is now trying to change that once again, not sure how that will turn out): the quicklaunch applets.
Why do OpenOffice and Firefox (and Microsoft Office itself, a long time ago, I think had the same thing… maybe Office 97? I lost sight of that stuff, with the years) need such hacks? Well the answer is functionally simple: to take less time to load a document. Reduce the time-to-startup of the application and the user will be happy, but how do you do that? Make sure that application is already running, invisible to the user… in the system tray. It gets especially important in Windows because the process creation time has historically been worse there than it is (was?) in Unix, and Linux.
I’m not an expert enough to know why it is on Windows, and X11, that the applications close their process (or main process, in the case of things like Chrome) when all their windows are closed, it’s probably related to the fact that you might not want to have processes running you cannot see at all (although you’re full of such things nowadays on both environments!), but so it is: minus the quicklaunch applets named above, once you close the last OpenOffice document window, or the last Firefox window, their process is gone, and the next start up will require you to start the application from nothing (which is, obviously, pretty slow even on Unix).
This is not the case on OS X, as there you have a running application, which may or may not have windows open… when you close all the windows, the application keeps running, invisible to you if not by a glow (or an arrow on pre-Snow Leopard versions) under its icon in the dock. Keep the application with running processes, you don’t have to load them from scratch even if all their windows are closed away. Actually, I think would be very nice to have in Linux, if used as a desktop.
I heard of lots of software that tries to simulate the same behaviour, by dividing in backend and frontend applications (and thus, processes), and using D-Bus or other methods to communicate to each other. How well this is working out, I cannot judge. I certainly can find why this is an interesting approach, but until all applications behave like this (if ever!), then I don’t think “dock-like” software is apt for Linux.
This is nothing different than using the development process of applications used under OS X to Linux, as I found done with DropBox …
I think the point of the dock is that it unifies an app starter with info about running programs and a “switch to app” action in one GUI — without clutterring that GUI in the process.So this is a great UI idea (which by the way daisy offers for KDE: http://kde-look.org/content… — it also improves on the idea by allowing the use of a circular dock).And naturally people want to use the best ideas. Now we’d just need to include the notification area icons into it, so a program is shown as a starter/switcher/infolet, maybe with a + for starting a new window (if none exists) and the notification area icon for the other actions.
I’m doing the same thing for a customer: writing applications for industrial CNC running on embedded devices, where their load from scratch take ages due to the heavy amount of data to process before to show the UIs; I’m solving the problem by dividing the applications in back-end and front-end components and to use D-Bus to communicate to each other, but I’m not satisfied by this solution: it’s excessively complex to maintain (unprivileged processes that need to speak to privileged processes) and you need to run D-Bus which is a non-realtime application running onto a real-time OS.p.s.: D-Bus is also slower and has less bandwidth than normal sockets, maybe AMPQ implementations can be a better alternatives for D-Bus.
A Mozilla person has written a lot about trying to make firefox launch fast on Linux. I think your interests overlap, so you might be interested: http://blog.mozilla.com/tgl…There is a bittorrent client that is divided into a daemon and a UI process. This always seemed like a good idea to me, to make the network connection survive a restart of the X server.
Thanks Zeev, that actually seem to be a pretty interesting read, especially about the link to icegrind, I’ll have to dig into that as soon as I have some free time!I sure hope they’ll start using the “fat” firefox-bin sooner or later 🙂