Have you ever been bitten by accidentally loading multiple instances of the same application in GNOME? When you click on the launcher of an already-running application in GNOME, it will load up another instance of the same application, instead of switching to the already running one. This can lead to bugs and other unforeseen behaviour, which of course isn’t desirable. In GNOME 3, this issue has been resolved.
In a lot of cases, this behaviour is rather harmless. If you launch two instances of Calculator, you’ll end up with two gcalctool
processes, but this won’t cause much damage or problems. However, if you try this with more complex applications, you may run into problems; for instance, they may overwrite each other’s data or configuration files. Or, if you launch XChat twice, you end up being logged in twice.
The GNOME 3 Shell will be application-based instead of task window-based. Consider the Calculator example: currently, launching Calculator twice will leave you with two entries in the task list – an entry for each window. In an application-based environment (for example, Mac OS X), you would have only one entry for both instances of the application.
Since GNOME 3 Shell will be application-based, this is exactly what will happen. An important aspect of the GNOME 3 Shell is that the “window list” and “menu” are combined into one (similar to the new taskbar in Windows 7, or the Dock in Mac OS X). The distinction between “running” and “not running” is no longer the focal point; if you click a launcher, and the application is not running, it will be loaded for you. If you click the launcher of an already running application, you’ll be switched to it.
But what if I want to load multiple instances of the same application? Applications for which this would make sense can implement a “New window” option, and this new window could then be run in the same process, or in a new one.
As minute as this change may seem, it is a very big shift for GNOME. I personally thoroughly dislike the current behaviour, but I do know that many GNOME users prefer things the way they are, and they see true benefit in having launchers open new instances instead of switching to already running ones.
What are your thoughts on this? Which concept do you prefer, application-based or task-based?
Window-based or process-based would be much better. The first thing a Linux user like me thinks when I hear task-based is activity-based, which is quite different.
But I guess I have to take into account who is writing and Thom is a Windows user.
I used the exact terminology as in the blog post.
On top of that, this article was written on my Linux installation…
I didn’t find “task-based” in that blog post but it starts with “A major change we’re trying in the GNOME 3 Shell is to be application-based instead of window-based.”
He changed it. It used to say “task based”.
Yeah, “window” is the right term here, my original post was incorrect.
I changed it in the article here too. Just wanted to use the terms you used to make sure no misunderstandings happened. Task-based indeed sounded odd to me, but I figured it could’ve been that GNOME used a different convention or something .
Good to see you managed to get some work done in between Xorg crashes. Or was this a product of vi? 😛
This makes a lot of sense…
The only thing is that with some apps it is desirable to open multiple windows (OOo, Firefox)…the user will have to use the file menu to open a new window. no big deal.
I think Gnome 3 is going to be a fantastic release with all of this polish being added. We are finally moving away from the windows UI model and creating our own distinct environment!
Well I don’t know, The only programme I know that behaves annoyingly is Thunderbird, when I open it when it is already open the newly open instance keeps saying it starting in the taskbar.
I do not want this feature, for example, if I want another terminal in another workspace (which happens allot!), now I just click the terminal icon in my panel, or press the keyboard shortcut. With this feature I’ll have to,
1)click the terminal icon (which most probably switches to the workspace an instance in located.)
2)open a new window
3)switch the new window to the workspace I wanted it to be (which I have to remember)
This might not seem such a big problem, but considering how many times I need a quick terminal it can really mess up my work flow.
Edited 2009-09-03 13:31 UTC
This does not make sense. I want to click on the terminal, or even better use a hotkey to get a second one. I don’t want to press Menu -> New Window.
Once again, gnome tries to reinvent the wheel of usability, which is clearly a bad move.
I’m guessing they’ll just do what Windows 7 does: middle click for a new window…
And how will this be distinct? It will work exactly the same way as in Windows 7 or MacOSX. Previously it worked the same way as in previous versions of Windows.
Yes, my second sentence was:
“In this we’ll be in good company with newer releases of other operating systems, but it’s still a major change. What I want to explain in this blog entry is what that means from a user perspective.”
Insert “GNOME” before “user” here; not all GNOME users/sysadmins/developers have used Windows 7 or OS X, and I wanted to explain the change to that audience. There are no plans to run out to patent it…
The only thing is that with some apps it is desirable to open multiple windows (OOo, Firefox)…the user will have to use the file menu to open a new window. no big deal.
Hmm why the file menu? If one is trying to address an issue at least do it right:
– When a program is running and its icon is clicked from the task bar / launch bar, activate its window BUT when a program is running and an icon is clicked from the “Applications” menu, create another instance.
I think Gnome 3 is going to be a fantastic release with all of this polish being added. We are finally moving away from the windows UI model and creating our own distinct environment!
Hmm only time will tell…
Edited 2009-09-03 21:53 UTC
I think it sucks, to put it very bluntly. It seems like they’re trying to rip off Windows 7’s taskbar and doing a terrible job if it by hybridizing it with this ugly sidebar. My parents will not be able to operate this. Hell, I might have trouble operating this.
Xfce will take GNOME’s place as the GTK+ desktop of choice. Lets hope the Xfce guys don’t go crazy in the future and screw up the great project they have going.
Edited 2009-09-03 13:23 UTC
It shouldn’t be the app who decides how the user wants to use it. When you launch an app there should be the option to either switch to existing or to start a new one (e.g. lclick:switch,rclick&option:launch new).
There are countless occasions when I use several different instances of the same app (browsers, word processors/text editors, IDEs, terminals), without the expectation that when one instance crashes it takes all instances with it (that would happen if a “new window” isn’t a real new process and this issue isn’t handled at application level).
in the linked article comment section the idea of multiple word processors was brought up. Someone explained that what’s actually happening is that the wordprocessor just opens up a second window and not a second instance of the running program. So when you’re viewing two documents in OOo side by side, you’re actually running one copy of OOo but with two windows.
So as long as applications are smart enough to open new windows when needed, it shouldn’t be much of a problem.
On a personal note, I think it would take some time getting used to using this. In the linked article it was suggested that maybe a middle click would open up a second instance of the app. Think this would make it easier to adapt/use.
It’s GNOME that isn’t being smart enough. You don’t design a desktop around how you want existing applications to behave.
While I can see this being all well and good for apps from the gnome project itself, I don’t see how this change will work well for independent apps. You can’t expect everyone to conform to gnome’s own vision.
Take VLC – it doesn’t have a new window option and you can’t guarantee that the VLC devs will implement it just for the gnome desktop.
I think this sort of behaviour should be user changeable on a per app basis, but the GNOME project seems to have a lot of antipathy towards user configurability so I doubt that will happen.
Except not many do. E.g., Calculator, which you brought up, doesn’t have a “New window” option, but I still want to use a bunch of them at the same time. I’m currently running two instances of avidemux, which also doesn’t have any “New window” option. The same goes for most of my applications. There are very few applications for which I want to switch to a running instance when I launch them (basically only my browser, email and IM clients).
OTOH, applications that shouldn’t be run in parallel can, and should, implement an “activate running instance instead” option. Many such apps already have implemented this.
So, this is a change that will break a lot while gaining almost nothing.
I would like the default to be task-based, but configurable to be otherwise if needed by the user, or if it doesn’t make sense to be task-based.
But… don’t do it the OS X way. If you close the last window of the program, just close the program ok?
I don’t really understand why this kind a system is implemented, I mean shouldn’t application coder make sure there can’t be 2 instances if they see it harmful to application? Doesn’t Linux support this??? Atleast in Windows it’s possible to check if instance of program excists and then use it or pop warning message.
Why not leave the current procedure as it is from the user’s point of view, and just open a new window for the application when the user chooses it second time from the menu? You can add the New Window command, just don’t remove this familiar way of opening new windows.
It’s a meh, but what I really want is for them to stop assuming I don’t want multiple instances of an application.
It’s the #1 reason I avoid Totem. Often I’ll have a show or movie paused, and I want to quickly listen/watch to an mp3/video a friend just sent, only to have it load in the same instance as my paused video.
I think it should work in exactly opposite way. If launching multiple instances of an application may cause harm, then it is a bug in the application and its devs should either fix it, or prevent multiple launches. For example, Firefox works this way: by default, launching another browser just opens new window in the already running process, and if you specify command line option forcing it to open a new process, then you must also specify different profile, as firefox will refuse to run second instance with same profile.
Detecting running instance is quite easy, so it won’t put too much burden on the developers, but a easy to use framework implemented as part of GNOME would make it even better.
Using Gnome-Do in docky mode already provided this functionality, a really good blend of task manager and launcher. it can also launch multiple windows for tasks with simple right click and select ‘run’. It’s been a while since I have tried the other popular docks (AWN and Cairo) but pretty sure they work similarly.
I am not sad to see this implemented by default in Gnome, it just seems like no big deal. I can’t really foresee it affecting how I use my desktop at all.
Exactly what i was going to say.
Also, Docky launches new instances if you middle-click on the icon in the task bar, so it’s basically perfect.
In my current desktop I have absolutely no panels, desktop icons or anything, just Gnome-Do in Docky mode. It’s the perfect setup I think. I would show a screenshot but it would just be my wallpaper with nothing on it… (autohide)
Edited 2009-09-03 16:29 UTC
I agree that the application based behavior of going to the current window is good default behavior. However, for applications where multiple windows make sense, wanting a new window is common enough that it should be easily accessible. This shouldn’t entail switching to the application and then selecting “New Window” from the application’s menu. The “New Window” (or just “New”) option should be available from the launcher/switcher with minimal effort (few mouse clicks and very little mouse movement). I’m operating off minimal info here, so it is likely the devs already have this covered.
My personal preference would be to have “New Window” behavior available through a right-click menu, middle-click, and ctrl-click, but there are other ways that would work. This behavior would only be available on applications that implement the “New Window” behavior. Having scriptable launchers for non-Gnome applications would also seem a necessity here.
This behavior, or at least what they seem to be trying to do, reminds me a lot of the way Applications are handled on Mac OS X. For example, in OS X, you very rarely (if ever) have multiple instances of a GUI app open. Clicking on or otherwise opening an already running app merely switches to its window or, in the case of opening a document from your file manager of choice, creates a new window under the already existing app.
Personally, I think this is something that application developers should be able to control depending on the app in question, but on the flip side, often times the application developers do not consider this and, if they do not account for what having multiple instances of the application open may cause, you can certainly have some undesirable behavior. Perhaps this new default in GNOME is good, but definitely allow it to be overridden explicitly by the application developer if called for in a particular situation, or even explicitly if desired by the user if they know what they’re doing.
ABOUT TIME. AT LAST.
<SARCASM>With this kind of radical thinking and this speed of innovation we can begin to hope that gnome will ditch gtk+ for Qt before 2015.</SARCASM>
Edited 2009-09-03 17:39 UTC
I can see why for something like a calculator, you might only want one, to cut down on confusion. However, if you open a calculator and then go to another desktop and try another instance, another calculator should open up IMO. For the most part, I agree with this though; I don’t know how many times I’ve accidentally double-clicked something without meaning to (involuntary muscle movements, I guess). But, I use multiple file manager windows all the time; I *don’t* want anything to get away from that. And don’t say to use tabs; I like seeing both the source and destination directories. So maybe have a predetermined list of programs that are allowed to have multiple instances, like file managers and text editors, and allow adding others.
On the other hand, this will prevent double-opening programs that really shouldn’t be, like Stellarium, games, the GIMP, etc.
This is all well and good for usability–I cannot count how many times I have had to help users who double clicked a single click launcher and could not figure out why they had so many windows–but what happens when I *want* to open the application twice? Even the article’s contrived calculator example is a problem. Sometimes I really do want two calculators side by side, so I can do two sets of calculations and see the results of the other at all times. Yes, I know I can copy/paste, write things down, etc., etc., but I don’t do that now and don’t see why I should have to.
If launchers check this for me and save me from myself, fine, as long as:
* I can access (maybe in a context menu) a way to say ‘launch new instance anyway’
AND
* I can change the default behavior to not save me from myself.
If these things are not possible then this is a massive step backward… not that I expect anything else from GNOME.
So instead of keeping things consistent they are going to deviate. Brilliant. Click on it and it starts. Click on it again and it focuses. Brilliant.. Its just stupid! Instead of people writing their applications properly so if I start two they dont clobber each other have the window manager(env) manage this? What!? So then depending on what WM/ENV I use the app may or may not break. Consistency is FAR better than hand holding. Its not the job of the ENV/WM to ensure applications run themselves properly. Stop copying the other desktops. Especially the inefficient and DEFICIENT ones such as OSX and Windows. Next thing you know they are going to make it so the entire gnome panel takes on the menu bar of the application akin to moronic OSX. Hey while were at it lets go back to a one button non-scrolling mouse and get rid of those virtual desktops(pager) as man those things are just annoying. 7 thumbs down. Yep 7. 4 people here and one had a sandwich in one hand so it was hard to call.
Agreed.
App launchers should do just that: launch applications.
It’s not the job of the app launcher to figure out whether or not to focus an already running app, or whether to open a new window of a running app, or to start a new instance of a running app, or to start an app.
The job of an app launcher is to find the binary, and execute it. Done!
And here I was, thinking that maybe Gnome 3.x would be what I needed to go back to Gnome (used the 1.x series for a few years, the 2.x series for more than half a decade). But they are taking into shit bullshit?
Seriously, if I click a launcher, I want to LAUNCH an application, not activate one that’s already launched.
Too bad. Let’s see what’ll take me away from WM Hopping again.
I agree. If there is some reason that the application should not have multiple instances, the application itself should be designed to handle that. This is one of the basic design elements of any application.
In the Gnome Configuration Editor there is/was already an entry “application_based” with the description:
So, hopefully, it’s still possible to switch it to false in Gnome 3.
Edited 2009-09-03 23:38 UTC
The funny thing is that I like this approach. Having the raise-window raise all the applications windows and everything. But that’s why a Metacity is a “Window Manager“. He’s expected to have (at lest one, but hopefully a few) different options for how to manage my windows.
An application launcher, on the other hand is not a “Application Running State, Focus and Z-Order Manager”, it’s just a freaking Application Launcher. I don’t understand why people are trying to equate launching an application to get it back on screen with focus.
For a long time the majority of users (that is, almost every windows user, most KDE, most Gnome) are familiar with the concept of “I launch my apps here, and I manage the list of opened apps there”.
The taskbar for most, the Alt-Tab window for me. Now, if I want to have a launcher on Gnome 3, even if I don’t like the idea of a TaskBar, should I be forced to have my launchers behave like one? Meh.
Exactly! Let the Window Manager manage the application windows, and let the App Launcher just execute binaries.
Yep! That’s why we have an app menu for launching apps, and a taskbar (amongst other options) for managing windows on screen.
Let’s keep them separate, please. The tools I use for launching apps should not be same as the tools I use for managing windows.
Why can’t they just provide a checkbox for each launcher’s properties, where you select the behavior individually?
Because it’s GNOME that we’re talking about here, remember? Too many options might confuse our userbase… ^_^
And going back on-topic, I will side with the majority: that should be left to the application to decide, not the application launcher.
The thing they ought to fix, never mind the launcher, is this:
There was an error starting the GNOME Settings Daemon.
Some things, such as themes, sounds, or background settings may not work correctly.
The last error message was:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
GNOME will still try to restart the Settings Daemon next time you log in.
This behavior should be left to developers to implement. You can only run one instance of my application, because I coded it that way. Trying to launch another instance of my application will just open a new window in the same process. With another application I wrote trying to launch a new instance of it will just show an already running instance if available. I think what they’re trying to accomplish is a good idea. However, my position is that such behavior should be left to developers to implement.
With due respect to the Gnome devs for the wonderful work they are doing on Gnome 3.0, I have to say that this seems to be a wrong decision.
It should never be the responsibility of a launcher to decide how an application manages multiple instances. It is always the responsibility of the application process to determine whether multiple instances should be supported or not. If an application is not designed to support multiple instances, it would handle a new process invocation gracefully, by just switching to the currently running application window, or informing the user that it is not allowed.
If this logic is built into Gnome Shell, what would happen if I go to the command line and run multiple instances of the calculator?
Not only is the problem an illusion that I have never encountered but it breaks several major use cases and makes GNOME behave in a way that is not expected by people who are used to using any other GUI. So where is the gain?
e.g. how will I open up another text editor when I have several documents open already and I want to start a new one? Will I have to find one of the existing windows and then ask it to open a new document? What if I “view-edit” a file in a file browser – do I open up with a new or an existing instance of my editor?
What If my existing instance has hung and it can’t do the “open new” action – how am I supposed to work that out?
Why not put some development effort into something that’s actually useful or new? e.g. who cares about “application oriented.” If anything one wants “object oriented” – so how about spending some time thinking about that? Maybe we could catch up to where OS/2 was in the 1990s.
This behavior works well for a dock. I really hope GNOME 3 gets a usable dock implementation even if it isn’t the default. Panels are more than a bit outdated.