dcop questions : I found it (not realy :o( )
Carsten Schlipf
carsten at yeap.de
Fri Jul 2 21:17:54 BST 2004
Hi Nicolas,
I use the following to start the konsole and get the PID:
eval "konsole &" > /dev/null
konsole_id="konsole-$!"
You can't use kstart to start the konsole though.
For the case someone is interested, attached is a script that opens a
konsole window and opens sessions to a list of hosts (listed in a file)
in tabs.
Best regards,
Carsten
Nicolas wrote:
> On Friday 02 July 2004 07:31, Kevin Krammer wrote:
>
>>On Friday 02 July 2004 06:00, Nicolas wrote:
>>
>>>On Thursday 01 July 2004 22:59, Nicolas wrote:
>>>
>>>>I found it. It's not realy clean, but it does the job.
>>>>
>>>>kstart -type Override konsole --script --profile log_no_deco
>>>>pid=$(expr $$ + 2)
>>>>konsole1=konsole-$pid
>>>>
>>>>then dcop $konsole .....
>>>>
>>>>Nic Cola
>>>
>>>the hack works if i only start one konsole. "$$" give the PID of the
>>>shell script. I'd need the PID of the konsole...
>>
>>You can get the PID of a session's shell by DCOP.
>>You could look through all sessions until the you find the PID you got by
>>your construct above.
>
>
> It's fine if I do it my self (with the mouse and keyboard), but I'd like to
> place 7 konsoles with 2 differents profiles. Since dcop need the
> "konsole-$PID" type of string, I need the pid to find my konsole :o)
>
> The big problem with "$$" is the possibility of other process to start before
> the last konsole is started. I tryed to add a constant number to the base
> PID to have the PID of the other konsoles, but I always vahe problem with the
> last ones depending if another process is started.
>
> If I find a solution, I'll post it here.
>
> Nic Cola
>
>
>>Cheers,
>>Kevin
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opentestenv.sh
Type: text/x-sh
Size: 1170 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde/attachments/20040702/e0a2f0b2/attachment.sh>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list