Re: Deciding whether we're running under Gnome



On Mon, Mar 17, 2003 at 10:16:28AM -0500, Stefan Monnier wrote:
> > The way we need to do this is that
> > GTK, Qt, and Emacs should both obey settings stored on the display,
> > e.g. with XSETTINGS.
> > See http://www.freedesktop.org/standards/xsettings.html
> 
> The question is not just for colors.
> E.g. should Emacs use gnome-moz-remote or kde-moz-remote (I have no
> idea if KDE has such a thing and if so how it's called) to open
> a page in the default browser ?

There isn't a reasonable way to do that right now. You would have to
actually read the setting out of GConf or KConfig.

The right approach would be to somehow make this setting an XSETTING,
etc. But XSETTINGs isn't really going to scale to lots of settings. 
Which is why we eventually need a common configuration system 
(maybe it will happen eventually).

Anyway, to answer your question, I don't think there is any fully
reliable way to see if GNOME/KDE are running. The thing is it's fairly
common to run GNOME without any given component - some people don't
run nautilus, metacity, gnome-session, etc. So you can't check for any
of those.

> > Emacs in CVS uses GTK though, so you can do it a lot simpler and just
> > copy the colors etc. from GTK.
> 
> Emacs in CVS does not "use GTK": it can be compiled to use the GTK toolkit
> for menus and scrollbars, just as previous Emacsen could be compiled
> with the Motif toolkit.

Sure, but it's fair to only get the standard colors if you build with
GTK. If someone builds with Motif they should expect to not have
latest and greatest theme-matching technology.

> And IMHO even Emacs compiled with GTK should prefer kde-moze-remote over
> gnome-moz-remote when running under KDE.

That's true.

Havoc



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