Sanity check in startkde

Frans Englich frans.englich at telia.com
Sun Feb 1 13:44:04 GMT 2004


If a curious user runs startkde in his/her kde session - the sessions is 
crashed.
This can be fixed by doing a sanity check. There's two candidates:


# check for already running KDE
dcop kdesktop KDesktopIface isVRoot >/dev/null 2>/dev/null;
if test "$?" = 0; then
  echo "ERROR: KDE seems already running on this display."
  xmessage -geometry 500x100 "ERROR: KDE seems already running on this 
display."
  exit 1
fi
(from SuSE's startkde, I'm told)

And:
if test "$KDE_FULL_SESSION" = "true"; then
  echo "ERROR: KDE seems already running on this display."
  xmessage -geometry 500x100 "ERROR: KDE seems already running on this 
display."
  exit 1
fi

I don't know why the former/latter should be chosen infront of the other, the 
latter is perhaps faster while the former is more safe - if KDE_FULL_SESSION 
for some reason is not unset it won't bail out..?

Code by Stephan, basically.

Cheers,

		Frans




More information about the kde-core-devel mailing list