I want to create a python panel for Linux like pypanel or tint2 just for fun and to do practice with python development.
Now the problem is:
I want to create an auto-generated menu, but I don’t know where to start.
Where can I find all user’s installed software in a Linux distro? I know I should look in the /usr/bin
folder, but I don’t know if it’s really the best thing to do.
Is there a way to filter installed apps to avoid dependecies programs?
There is a somewhat standardized way of doing this that many Linux desktop environments follow. Look in the directories /usr/share/applications
and ~/.local/share/applications
for files with names that end in .desktop
. Each of these files will correspond to one program and should look something like this:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Sample Application Name
Comment=A sample application
Exec=application
Icon=application.png
Terminal=false
You can parse these files to get the information to populate your menu.
For more infomation, see http://developer.gnome.org/integration-guide/stable/desktop-files.html.en
0