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.

Is there some service or event that is created when the deb installer installs new software? I want to create desktop shortcuts everytime a new app is installed. I know how to do the shortcut, I just want to know if there is an event I can tie to that part of the script.

share|improve this question
add comment

1 Answer

  • Workaround: If you use unity, when you install software using the software-center (ubuntu software center), there's a note at the bottom of the window asking you if you want to create a unity launcher. You can click "Yes" or "No" accordingly.

  • On the other hand, you could create some script that checks the log file:

    cat /var/log/dpkg.log|grep installed
    
  • There are triggers, but as far as I can read, they are incorporated in debian packages:

    man debian-trigger deb-triggers
    

    (I wonder how desktop-file-utils triggers dpkg: Processing triggers for desktop-file-utils)

    less /usr/share/doc/dpkg-dev/triggers.txt.gz
    ls /var/lib/dpkg/triggers/
    
  • Finally, maybe you could use dnotify for your script and watch the /usr/share/applications directory, where .desktop files are saved:

    http://serverfault.com/questions/50127/how-to-automatically-run-a-script-when-the-contents-of-a-directory-changes-in-li

share|improve this answer
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.