dcop questions : I found it (not realy :o( )

Nicolas ripley at 8d.com
Fri Jul 2 13:51:35 BST 2004


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

-- 
()  ascii ribbon campaign - against html e-mail 
/\                        - against microsoft attachments
___________________________________________________
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