Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to run a script automatically when an application start. How would I do this without making the script run at start-up?

My current approach is writing a script with an infinite loop and made it run at start-up. Then let it check if a certain app is running.

share|improve this question
1  
Why exactly do you need this? Isn't it an option to simply use a wrapper script or something like that? –  JanC Oct 26 '10 at 9:03
add comment

1 Answer 1

up vote 4 down vote accepted
  1. If the way of starting the application is always manual then create another script with the links to the script you mentioned plus the application. Then link this new script to the launcher.
  2. If the application is launched by another application then you have to rename the original application and then put the script mentioned in my above point 1 in place of the original application and rename it with the same name as that application.
share|improve this answer
    
thanks for the tip jumbli, it worked. i used Gnome-Do for the launcher. –  James Oct 26 '10 at 10:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.