Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question

closed as not a real question by Blrfl, gnat, Walter, GlenH7, Robert Harvey Oct 29 '12 at 19:53

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
    
Thanks, really helpful :D –  Antonio Ciccia Oct 29 '12 at 17:05
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.