Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I made a text editor for Ubuntu in Java, and now I want to upload it on the Ubuntu Software Center but I have ran into a problem, how will Ubuntu recognize that my application is an editor once people download my application? is there a way to register my app in Ubuntu with Java as an editor so when people try to open a text file, my application shows in the "open with" menu? any help would be appreciated.

share|improve this question
up vote 2 down vote accepted

Create a .desktop file for your program and install it to /usr/share/local/applications. It should then appear in the main menu and in the list provided by the "choose application" dialog. To make it open text files, use the MimeType and Categories lines. For example, the .desktop file for Leafpad includes this:

share|improve this answer
More on how .desktop files work: – Wutaz Sep 16 '13 at 21:38

Your Answer


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.