Re: Programmatically rescanning desktop or creating launcher





On Tue, 1 Feb 2000, Federico Mena Quintero wrote:

> >  I've been trying to find out how to create a desktop
> >  launcher from a program or script, without much luck.
> >  When I manually create a launcher file under 
> >  ~/.gnome-desktop, the icon does not show up
> >  until the Rescan Desktop menu is clicked. I have
> >  also tried a few of the gnome_desktop_entry APIs,
> >  but these also seem to require rescanning the desktop.
> 
> You can use the Midnight Commander's CORBA interface to ask it to
> rescan the desktop.  Please see mc/idl/FileManager.idl.
> 
> >From a shell script you can also use the `gmc-client' program with the
> `--rescan-desktop' option.  You can look at its source to see how it
> calls MC via CORBA.

Thanks for the response. gmc-client is not really an
option for us, since we essentially want to come up 
with a solution that any user of RedHat 6.0 out there 
could rely upon. I tried the CORBA approach you suggested,
but it isn't finding the object.

static CORBA_Object
get_window_factory (void)
{
	CORBA_Object obj;

	obj = goad_server_activate_with_id (
		NULL,
		"IDL:GNOME:FileManager:WindowFactory:1.0",
		GOAD_ACTIVATE_EXISTING_ONLY,
		NULL);
	if (obj == CORBA_OBJECT_NIL)
		fprintf (stderr, _("Could not contact the file
manager\n"));

	return obj;
}

I'm getting "Could not contact the file manager." Is the
MC not registering a CORBA object in my system? (The version
reported in the About box is 4.5.30).

Thanks again,
--Jose




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]