Determine if Xfce is running

mmassonnet at gmail.com mmassonnet at gmail.com
Thu Sep 13 19:00:37 CEST 2007


On Thu, Sep 13, 2007 at 06:50:40PM -0700, Christian Dywan wrote:
> Hi,

Hello Christian,

> I wonder, what would be a good way to figure out from a program, if the
> user is running Xfce? I know about the environment
> variable DESKTOP_SESSION, which is set by gdm and (a recent) kdm. Yet
> this works only if there's actually one of these running. So are there
> any alternatives?

How about `pidof xfce4-session`.  That means that you did something to
start Xfce, however keep in mind that users can run other core
components, eg. replacing the window/desktop/... manager.

> Best regards,
>     Christian

HTH,
Regards,
Mike



More information about the Xfce4-dev mailing list