After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 128389 - Launcher option to restrict to single instance of program
Launcher option to restrict to single instance of program
Status: RESOLVED WONTFIX
Product: gnome-panel
Classification: Other
Component: general
1.5.x
Other Linux
: Normal enhancement
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-12-02 21:06 UTC by Boris Goldowsky
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Boris Goldowsky 2003-12-02 21:06:13 UTC
If you click a launcher twice, it will currenly launch two instances of the
program unless the program itself is a wrapper that can detect this
situation.  The results are at best an extra burden on application
developers to provide a launcher-friendly wrapper for their program; at
worst, it creates a dangerous situation where you may get two instances of
a program attempting to modify the same file.  In any case, the
inconsistency of things currently is confusing.

My suggestion is that launchers should keep track of the process that they
start, and not start another one if that process is still active.  Instead,
they should raise the windows of the active process to the front.  Compare
this to the behavior of the Mac OS X Dock.

An architecture like this could also allow generic launchers to have a menu
item to kill the process they started, or view its standard & error output.
 They could also warn you if the process fails to start for some reason;
currently there is no feedback if a process hits an error while trying to
start.

Examples of current situation:

Epiphany, mozilla, evolution: each contains specialized code so that
multiple launcher clicks will stat new windows, but all communicate with a
single backend.  This is a nice design, but takes effort from each
application development team.

Gnucash: each launcher click starts a new instance of the application. 
Second and subsequent instances start up with a warning message that the
database is locked.  Ignoring this message can cause data loss.

Gnome Print Manager: opens multiple instances, which is unlikely to ever be
more useful than one instance.

Gaim: starts multiple instances; some protocols will cause errors in
subsequent instances due to multiple connections not being allowed.

Volume control: starts multiple instances; since they don't update
themselves the least-recently-used one will display incorrect information.
Comment 1 Brian Kerley 2004-04-17 22:34:00 UTC
Maybe instead of just restricting one instance of the application, it could act
a lot like the OS X doc where it keeps track of all open windows, yet still
allows you to click the icon to launch a new instance if you really like.  Other
things that would be useful, especially for Mozilla, is if you could have the
option of launching a new window, b/c Mozilla only allows one instance of the
program per profile.  That's more application specific though.
Comment 2 Mark McLoughlin 2004-04-20 09:22:25 UTC
I don't think there's anything wrong with launching two instances of a program
if the user intentionally invokes the launcher twice. Maybe I want two
calculators, maybe I want two web browser windows each on a different workspace etc.

If I'm reading the first comment right the real problem here is that users can
easily invoke the launcher twice when that wasn't their intention.

See bug #75796 for a discussion of this problem.

*** This bug has been marked as a duplicate of 75796 ***
Comment 3 Boris Goldowsky 2004-04-21 00:56:41 UTC
No, this is actually a enhancement request from 75796, so I am reopening.  Yes, it is fine to launch two 
calculators, etc, but there are several programs (examples above!) where there can NEVER be two 
instances running concurrently as the same user.   As the subject line says, I am suggesting that there 
be a launcher option to enforce this.
Comment 4 Mark McLoughlin 2004-04-21 06:58:31 UTC
Its the program's responsibility to do that itself and there are various
different ways of doing. It is impractical to do this from the launching
side.