Summary: | Want way to find session name from shell | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Rob Sims <robsims> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian stable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Rob Sims
2004-04-23 23:30:23 UTC
> SHELLPID=`ps -p $$ -l | tail -1 | awk "{ print \\\$5 }"` > KONSPID=`ps -p $SHELLPID -l | tail -1 | awk "{ print \\\$5 }"` This looks bogus, SHELLPID is then PID of Konsole and KONSPID the PID of kdeinit process? > SESSIONS=`dcop konsole-$KONSPID | grep ^session` May I simply suggest SESSIONS=`dcop \`dcopclient $KONSOLE_DCOP\` | grep ^session` CVS commit by binner: Add the ability to fetch the shell PID per session via DCOP CCMAIL: 80235-done@bugs.kde.org M +1 -0 session.h 1.61.2.1 M +1 -0 sessioniface.h 1.5.2.1 --- kdebase/konsole/konsole/session.h #1.61:1.61.2.1 @@ -92,4 +92,5 @@ public: void renameSession(const QString &name); QString sessionName() { return title; } + int sessionPID() { return sh->pid(); } virtual bool processDynamic(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData); --- kdebase/konsole/konsole/sessioniface.h #1.5:1.5.2.1 @@ -15,4 +15,5 @@ class SessionIface : virtual public DCOP virtual void renameSession(const QString &name) =0; virtual QString sessionName() =0; + virtual int sessionPID() =0; }; |