[kde-linux] Commands of KDE4?
James Richard Tyrer
tyrerj at acm.org
Fri Sep 4 00:40:00 UTC 2009
Christopher Roy Bratusek wrote:
> Hi all,
>
> I'm working on a KDE-Integration module for sawfish and need to now some
> things:
>
> - Is there an environment variable notifying us that KDE is running?
This is not a simple question. :-| It depends on what you mean by KDE
is running. That is, KDE is only a collection of programs.
Perhaps: "KDE_SESSION_UID" being set to the current USER will indicate
that a KDE session has been started.
> - How to get the KSM session-prefix/session-id via command-line/getenv?
Not sure exactly what you mean here. There is no process named ksm.
There is ksmserver. However, the process at the root of the process
tree for a KDE4 session is: kdeinit4. However, the command: kdeinit4
can also be running when a KDE session does not exist.
The command line:
pidof <process name>
will get the process id of KDM which you should be able to use with the
function: getsid() to find the session-id. Perhaps it would help to
look at the source for "pidof".
> - What command is used as help-browser (khelpcenter?)
yes, the shell command is khelpcenter
> - What command is used as control-center (kcontrol?)
No, name changed to systemsettings.
> - What command is used to pop-up the "About KDE-Dialog" (if any)?
AFAIK, you would have to use a KDE library function for that.
> - What command is used to pop-up the KDE Logout-Dialog?
The dialog that pops up when you right click the desktop and select:
"Leave"? That is probably hardcoded somewhere in Plasma. Perhaps a
D-Bus message? If there is documentation for this stuff, I would really
like to know where it is.
> - What options is used to make shutdown/logout pre-selected in the
> Logout-Dialog?
>
it would be in ../share/config/ksmserverrc
If this is the system default, there won't be anything anywhere, but if
it was changed either in the $KDEDIR or $KDEHOME it will be:
[General]
shutdownType=
This is a digit rather than a string so you will have to try it to see
which is which. IIUC, the default is "0" which is "End current session".
> All for KDE4, please.
>
I have to say that some these are rather elementary questions, some
basic familiarity with KDE would probably be of some help to your project.
--
James Tyrer
Linux (mostly) From Scratch
More information about the kde-linux
mailing list