[xubuntu-users] startup applications in correct order

Wybo Dekker wybo at xs4all.nl
Fri Feb 17 11:51:34 UTC 2012

On 2012-02-16 13:46, Chris Green wrote:

> This is an everlasting problem, I've raised it before and not really got
> any very useful answers.  I did use devilspie for a while but it doesn't
> *really* do what I (and it looks like a few others) want.
> What I have done is to use wmctrl and a 'waitFor' script that waits for
> a specific command to start so I have a script called from .xprofile
> that is as follows:-

This helped a lot! I did not quite understand your script, neither how
you started it and what the waitFor script should be like, but I
solved my problem, and more.

What I did was:
1. I removed devilspie
2. I removed all xfce startups except those started from
3. I created one xfce starter to execute bin/startup, writing output
   to ~/tmp/log: sh -c "bin/startup >tmp/log"
4. I logged out and in and ran wmctrl -l to see that there were three
   windows active:
   $ wmctrl -l
     0x01200004 -1 wybo xfce4-panel
     0x01200038 -1 wybo xfce4-panel
     0x01600003 -1 wybo Desktop
5. I created this ~/bin/startup:


# Startup what we need

rm .keepassx.kdb.lock
/usr/bin/xfce4-terminal --geometry 100x62+100+0 &
/usr/bin/cairo-clock &
/usr/bin/chromium-browser &
/usr/bin/keepassx &
/usr/bin/rhythmbox &
/usr/bin/gvim /home/wybo/bin/weight &
/usr/bin/skype &

# wait until all windows are there, 7 in all,
# plus 2 panels and the desktop makes 10 of them

while true; do
  wmctrl -l
  sleep 1
  if [ `wmctrl -l |wc -l|tr -cd '[0-9\n]'` -eq 10 ]; then
sleep 1

# put them in position and set properties

echo running window controls
echo terminal;  wmctrl -r terminal  -t 1
echo rhythmbox; wmctrl -r rhythmbox -t 5
echo cairo;     wmctrl -r cairo     -b add,sticky
                wmctrl -r cairo     -e 0,1720,0,200,200
echo chromium;  wmctrl -r chromium  -b add,sticky
                wmctrl -r chromium  -e 0,1920,0,1280,1024
echo keepassx;  wmctrl -r keepassx  -b add,sticky,above
                wmctrl -r keepassx  -e 0,950,550,600,300
echo skype;     wmctrl -r skype     -b add,hidden
                wmctrl -c skype
echo weight;    wmctrl -r weight    -b add,sticky
                wmctrl -r weight    -e 0,950,0,600,500

Now, after logging in, everything runs smoothly.
Thanks Chris!


More information about the xubuntu-users mailing list