Fedora Linux Support Community & Resources Center
  #1  
Old 12th April 2009, 07:57 PM
nt4cats Offline
Registered User
 
Join Date: Aug 2005
Location: Philadelphia, PA
Posts: 99
How do I test to see if fusion is loaded + ready?

I'm using gnome-do and its docky skin -- this gives me a cool (and useful) task bar.

My problem: docky won't load until AFTER fusion is loaded and initialized.

Here is how I load things upon gnome login:

Using System->Preferences->Personal->Sessions: I have it start ~/bin/autostart.sh. I did this because there were a few programs that I wanted to load AFTER fusion, and there was no way I could find to set the loading order using the "Sessions" application.

The autostart.sh script says:
Code:
#!/bin/bash
/usr/bin/fusion-icon &
sleep 12
/usr/bin/gkrellm &
/usr/local/bin/gnome-do &
So, I start fusion (by launching "fusion icon"), wait an arbitrary amount of time, and then load the two things that I want to load only after fusion is loaded and ready to rock-and-roll. This works 90% of the time. The other 10% of the time gnome-do loads before fusion is ready and I have to toggle the docky skin off and then back on to get docky working. If I increase the sleep time, it works 100% of the time -- but that bugs me because most of the time it is ready in 8-12 seconds.

I all seems too hackalicious to me to control this with "sleep". I've spent a reasonable amount of time with Google looking for a way to test if a composite window manager is running, and I can't find it. Can someone either point me towards an existing program I can use to test if fusion is running (and ready) -- or point me in the direction of an API I can use to write a (hopefully 10-line) "are there composite extensions ready to use?" program?

I'd like to do something like this with my autostart.sh:
Code:
#!/bin/bash
/usr/bin/fusion-icon &
COMPREADY=`~/bin/check-composite`
while [  "$COMPREADY" == "not ready" ]
do
   sleep 1
   COMPREADY=`~/bin/check-composite`
done
/usr/bin/gkrellm &
/usr/local/bin/gnome-do &
Or, if I'm writing it myself, I could write "wait-for-composite" that does the polling/looping internally until composite extensions are ready to use.
Reply With Quote
  #2  
Old 12th April 2009, 10:27 PM
nt4cats Offline
Registered User
 
Join Date: Aug 2005
Location: Philadelphia, PA
Posts: 99
It looks like I solved it for myself. Funny how that happens -- I'll spend a bunch of time on my own trying to solve something before posting a question here, and then I often end up solving the problem for myself within a few hours of my fedoraforum post.

I switched fusion off, recorded the output of xvinfo glxinfo and xprop. I then set it back on, and ran the same 3 commands. I compared the output of each -- and voila!! I noticed a difference in the xprop outputs that looked promising. The following line was there when fusion was running, and missing when fusion wasn't running:

Code:
COMPIZ_VIDEO_SUPPORTED(ATOM) = _COMPIZ_VIDEO_IMAGE_FORMAT_RGB
... so I hacked up a script to test for that ...
Code:
[ddenardo@cylon bin]$ cat iscompizrunning.sh 
#!/bin/bash
ANSWER="no"
TESTME=`xprop -root | grep COMPIZ_VIDEO`
if [ "$TESTME" == "" ]; then
    ANSWER="no"
else
    ANSWER="yes"
fi
echo $ANSWER
... and then plugged it in to my "autostart.sh" script ...
Code:
#!/bin/bash
/usr/bin/fusion-icon &
#sleep 12
ANSWER=`/home/ddenardo/bin/iscompizrunning.sh`
date > /tmp/how-long-did-that-take
while [ "$ANSWER" == "no" ]
do
   sleep 1
   ANSWER=`/home/ddenardo/bin/iscompizrunning.sh`
done
date >> /tmp/how-long-did-that-take
/usr/bin/gkrellm &
#/usr/bin/ggl-qt &
/usr/local/bin/gnome-do &
... and it seems to work. I've not tried this on a cold boot (when fusion startup takes the longest), but the test code (dumping the output of `date` to a file in /tmp) shows me it takes 2-3 seconds before proceeding, and docky has worked each time after I tried this.

I'll do a cold boot now and post the results here in a few minutes.
Reply With Quote
  #3  
Old 12th April 2009, 10:38 PM
nt4cats Offline
Registered User
 
Join Date: Aug 2005
Location: Philadelphia, PA
Posts: 99
Talking Solved! (for me at least)

The good news: That nailed it -- the problem is solved for me. On a cold boot (while it was loading gnome for the first time -- and a bajillion other things for sure) it waited 31 seconds between launching fusion-icon and moving on with the dependencies.

The bad news: I have no idea WHY my environment has that difference in the xprop output. I assume that this is related to the "video playback" check-box in ccsm (CompizConfigSettingsManager), but as everything is working for me at this point I am going to pay attention to my family who is here for Easter dinner instead of tinkering. If you don't have "COMPIZ_VIDEO" in your xprop output, I don't know how to tell you to get it there.
Reply With Quote
Reply

Tags
fusion, loaded, ready, test

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Test-Announce] Fedora12 Beta RC2 install test Demz Fedora 12 Alpha, Beta & Release Candidates 1 14th October 2009 10:53 AM
F12 Alpha test compose is ready now.please join us and execute > installation test Demz Fedora 12 Alpha, Beta & Release Candidates 28 27th August 2009 07:05 AM
Using compiz-fusion in Fedora 8 test 3 alpha645 Using Fedora 2 22nd October 2007 07:58 PM
V4L Loaded or not? svenkatesan Using Fedora 25 6th December 2005 01:39 AM


Current GMT-time: 10:12 (Saturday, 25-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Viana Photos on Instagram - Marinilla Photos on Instagram - Santa Fe Springs