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 just got inspired of this project:

http://www.opendesktop.org/content/show.php?content=145633

Well , i wanted to do a similar thing , after dpkg places something new in /usr/share/applications directory , but where should my script point to , and the parameter to pass in ?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

If the script do not takes parameters, add a file in /etc/apt/apt.conf.d/, for example 92local (numbers are used to force execution order of scripts in that directory), with the following content:

DPkg::Post-Invoke { "/path-to/my-script"; };

and remember to make it executable.

Cannot find right now information on how to pass parameter or input to the script.
If can be of help, when running apt on command line, you should find the command line in the environment variable SUDO_COMMAND.

share|improve this answer
    
i modified that script to find all the .desktop files automatically , so far my problem is resolved , thanks ! –  warl0ck Sep 30 '11 at 23:44
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.