[kde-linux] kstart --alldesktops

Jerome Yuzyk jerome at supernet.ab.ca
Thu Nov 29 09:32:01 UTC 2007


On Tuesday 20 November 2007 03:55, Kevin Krammer wrote:
> On Tuesday 20 November 2007, Jerome Yuzyk wrote:
> > I have a script that's supposed to load three instances of GKrellM on all
> > four of my virtual desktops. It looks like this:
> >
> > x---------------------------------------------------------------
> > kstart --alldesktops gkrellm &
> > kstart --alldesktops gkrellm -f -s 192.168.0.2   -P 19150 &
> > kstart --alldesktops gkrellm -f -s 192.168.0.166 -P 19150 &
> > x---------------------------------------------------------------
> >
> > I execute the script from a button on my Kicker.
> >
> > However, only the desktop I am on at the time I pick the button receives
> > all three GKrellMs. The other desktops receive only one of the three, and
> > that varies from run to run.
> >
> > Is something broken? I am running KDE 3.5.5.
>
> No.
> The problem is that kstart needs to modify the application's window manager
> hints, so it has to wait until the application window appears.
> Since you have given no specific name, it will take the next window which
> is being opened, so this can be the same gkrellm window for all three
> kstart calls.
>
> If gkrellm changes its window title (caption) according to the IP address
> it is connecting to, you can use the window title to specify which kstart
> call belongs to which window, i.e. see kstart's --window option.
>
> Cheers,
> Kevin

Yes that almost works. I have three windows:

  gkrellm
  gkrellm_S-TV
  gkrellm_S-bss-gate

So I use

x-------------------------------------------------------------------------
kstart --window 'gkrellm' --alldesktops gkrellm &

kstart --window 'gkrellm_S-TV' --alldesktops gkrellm -f -s 192.168.0.2   -P 
19150 &

kstart --window 'gkrellm_S-bss-gate' --alldesktops gkrellm -f -s 
192.168.0.166 -P &
x-------------------------------------------------------------------------

and the latter two windows are on all desktops, but the first one doesn't, I 
think because of its "gkrellm" title. From the kstart --help the --window is 
supposed to be a regular expression, and I guess it matches the other 2 
windows too. How would I make that search for only the string "gkrellm"?



More information about the kde-linux mailing list