Bug 39208 - Magicdev starts excessive applications
Summary: Magicdev starts excessive applications
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: magicdev   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Owen Taylor
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
: 72377 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-05-05 13:25 UTC by Alan Cox
Modified: 2007-04-18 16:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-13 23:52:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 16:57 UTC, Alan Cox
no flags Details

Description Alan Cox 2001-05-05 13:25:09 UTC
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 14:10:03 UTC
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 15:41:53 UTC
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 15:42:18 UTC
*** Bug 72377 has been marked as a duplicate of this bug. ***

Comment 4 Alan Cox 2002-08-23 16:55:50 UTC
This code should wrap the cd player and fix the problem nicely


Comment 5 Alan Cox 2002-08-23 16:57:04 UTC
Created attachment 72625 [details]
C wrapper for reliable once only unless on error

Comment 6 Owen Taylor 2002-08-23 23:35:56 UTC
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
solution.

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 

 _REDHAT_CD_PLAYER:/dev/cdrom

Or maybe even:

 _REDHAT_CD_PLAYER:fresnel.devel.redhat.com:/dev/cdrom

But it's close enough for now.

 gnome-applets-2.0.1-4
 gnome-media-2.0.0-7

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-24 01:03:03 UTC
Nice - yes much better for the X solution


Comment 8 Owen Taylor 2003-01-13 23:52:54 UTC
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.