Bug 39208 - Magicdev starts excessive applications
Magicdev starts excessive applications
Product: Red Hat Linux
Classification: Retired
Component: magicdev (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Owen Taylor
David Lawrence
: 72377 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2001-05-05 09:25 EDT by Alan Cox
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-13 18:52:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
C wrapper for reliable once only unless on error (2.96 KB, text/plain)
2002-08-23 12:57 EDT, Alan Cox
no flags Details

  None (edit)
Description Alan Cox 2001-05-05 09:25:09 EDT
If the panel cd-rom player is running or an existing gtcd then magicdev
really should avoid starting another CD-ROM application.
Comment 1 Owen Taylor 2001-05-07 10:10:03 EDT
This behavior is, I believe, already implemented for gtcd.

Doing it for the panel applet would be harder; IMO, people
who add the panel applet probably can just disable it from
the control center. To catch the panel applet being there
automatically would be a nice touch, but probably more
trouble to implement than it's worth. 

(Trouble is, you have to deal with things like starting gtcd,
then the applet, then closing gtcd. So, the standard 
unique CORBA server approach doesn't work.)
Comment 2 Owen Taylor 2002-08-23 11:41:53 EDT
We lost the gtcd "unique application" patches with the transition
to gnome2, so now we start multiple gnome-cd's as well. (Bug 72377)
Comment 3 Owen Taylor 2002-08-23 11:42:18 EDT
*** Bug 72377 has been marked as a duplicate of this bug. ***
Comment 4 Alan Cox 2002-08-23 12:55:50 EDT
This code should wrap the cd player and fix the problem nicely
Comment 5 Alan Cox 2002-08-23 12:57:04 EDT
Created attachment 72625 [details]
C wrapper for reliable once only unless on error
Comment 6 Owen Taylor 2002-08-23 19:35:56 EDT
Hmmm, make some sense, but also seems to have some issues:

 - Since it locks in the user's home directory, it won't
   handle multiple logins on different machines?

 - It doesn't behave that well for multiple login sessions
   on the same machine, though that's somewhat esoteric

 - It doesn't scale to handling the "cd-player-on-the-panel"
   situation nicely.

Since I know Xlib and GTK+ better than I know file locking,
and I think the semantic that is desired is "one CD player
per X display", I decided to go with an X selection based

Right now what happens is that there is an X selection
_REDHAT_CD_PLAYER. When a CD player app/applet starts
it sees if there is an existing owner, if not, it claims
the selection. When the current selection owner goes 
away, if there are other cd applets/apps running, one
of them takes over ownership of the selection.

THis isn't quite perfect ... it should be 


Or maybe even:


But it's close enough for now.


Have the necessary bits in them. Once those build, I'll do
a magicdev that starts 'gnome-cd --unique --play' as the
default command.
Comment 7 Alan Cox 2002-08-23 21:03:03 EDT
Nice - yes much better for the X solution
Comment 8 Owen Taylor 2003-01-13 18:52:54 EST
Seems to work nicely even with multiple CD players now.

Note You need to log in before you can comment on or make changes to this bug.