winter at kde.org
Sat Dec 15 15:32:25 GMT 2007
On Friday 14 December 2007 16:42:36 Tom Albers wrote:
> Ade noticed that startkde is using kcheckrunning:
> if kcheckrunning >/dev/null 2>&1; then
> echo "KDE seems to be already running on this display."
> kcheckrunning has been moved to playground/base/kdesktop.
> The startkde script does not seem to fail when kcheckrunning does not exist (on linux), but I can not imagen it works either ;-)
> So, what would be the solution?
Seems like a useful check to me.
kcheckrunning is a 5 line program.
Should I bring kcheckrunning back into kdebase/workspace?
here's the code:
Display* dpy = XOpenDisplay( NULL );
if( dpy == NULL )
Atom atom = XInternAtom( dpy, "_KDE_RUNNING", False );
return XGetSelectionOwner( dpy, atom ) != None ? 0 : 1;
More information about the kde-core-devel