How to figure out what script is starting a process

Hello, I have got compiz fusion to work on my KDE Kubuntu laptop. Compiz is little buggy on KDE so it would be nice to manually start it rather than it automagically start when I login. However, I can't figure out where its getting started from. Is there a way to track what script started a feature. I can find the script for compiz.real but I can't figure out what calls this script. Similary what is the grep command to search a set of configuration files for a key word? I remember someone mentioning it for search kernel sources a few months back. Cheers Chris

On Tue, 2007-10-23 at 11:39 +1300, Chris O'Halloran wrote:
Hello,
I have got compiz fusion to work on my KDE Kubuntu laptop. Compiz is little buggy on KDE so it would be nice to manually start it rather than it automagically start when I login.
However, I can't figure out where its getting started from. Is there a way to track what script started a feature. I can find the script for compiz.real but I can't figure out what calls this script.
pstree will show you who started what, all the way back to init
Similary what is the grep command to search a set of configuration files for a key word? I remember someone mentioning it for search kernel sources a few months back.
find /etc -type f | xargs grep -l "string" {} This finds all files in /etc then uses grep to search through them for your string. There are probably nicer ways of doing it though.

I have got compiz fusion to work on my KDE Kubuntu laptop. Compiz is little buggy on KDE so it would be nice to manually start it rather than it automagically start when I login.
However, I can't figure out where its getting started from. Is there a way to track what script started a feature. I can find the script for compiz.real but I can't figure out what calls this script.
pstree will show you who started what, all the way back to init
"ps afx" works similar...
Similary what is the grep command to search a set of configuration files for a key word? I remember someone mentioning it for search kernel sources a few months back.
find /etc -type f | xargs grep -l "string" {}
This finds all files in /etc then uses grep to search through them for your string. There are probably nicer ways of doing it though.
You could also use find's "-exec" option to directly execute grep, searching for "string" in the files that find comes across: find /etc -type f -exec grep -H "string" {} \; Note: "{}" gets replaced by the filename the find command encounters. Cheers, Peter -- Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ http://www.cs.waikato.ac.nz/~fracpete/ +64 (7) 838-4466 Ext. 5174

Thanks for the hints. It turns out kdeinit starts the the start-compiz file by using a .desktop file in .kde/Autostart I've been learning about .desktop files etc. Now I can at least control the compiz behaviour and elect to start it or not. Thanks for the other hints too. Cheers Chris On 23/10/2007, Peter Reutemann <fracpete(a)waikato.ac.nz> wrote:
I have got compiz fusion to work on my KDE Kubuntu laptop. Compiz is little buggy on KDE so it would be nice to manually start it rather than it automagically start when I login.
However, I can't figure out where its getting started from. Is there a way to track what script started a feature. I can find the script for compiz.real but I can't figure out what calls this script.
pstree will show you who started what, all the way back to init
"ps afx" works similar...
Similary what is the grep command to search a set of configuration files for a key word? I remember someone mentioning it for search kernel sources a few months back.
find /etc -type f | xargs grep -l "string" {}
This finds all files in /etc then uses grep to search through them for your string. There are probably nicer ways of doing it though.
You could also use find's "-exec" option to directly execute grep, searching for "string" in the files that find comes across: find /etc -type f -exec grep -H "string" {} \;
Note: "{}" gets replaced by the filename the find command encounters.
Cheers, Peter -- Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ http://www.cs.waikato.ac.nz/~fracpete/ +64 (7) 838-4466 Ext. 5174
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
participants (3)
-
Bruce Kingsbury
-
Chris O'Halloran
-
Peter Reutemann