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.
Asked
Active
Viewed 116 times
1 Answers
2
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:

Savvas Radevic
- 7,753
interest /usr/share/applications
– user.dz Jun 27 '15 at 05:04