So here I am using OCS and I have a mix of Windows and MACs and Ubuntu machines in my LAN. My issue is that I get thousands of lines of library files and what not listed as installed software in Ubuntu machine unlike in Windows where only those from Control Panel are listed.
After much searching I see that there is this file in /usr/local/share/perl/5.22.1/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Deb.pm which seems to list /var/lib/dpkg/info/*.list and run dpkg query command against each *.list file.
I do not need to list all these software and need to list only GUI kind of software. I want to list /usr/share/applications/*.desktop as software.
So in the Deb.pm script I replace line /var/lib/dpkg/info/*.list with /usr/share/applications/*.desktop . It is the line number 23. And I also replace line number 29 with *.desktop .
After this I get stuck. Here in this script it is using dpkg query. But in my case I think I should be reading each /usr/share/applications/*.desktop file and somehow print out in format same as dpkq query does.
Anyone can help me how I achieve this please?