Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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:

MimeType=text/plain
Categories=GTK;Utility;TextEditor;
share|improve this answer
    
More on how .desktop files work: linuxcritic.wordpress.com/2010/04/07/anatomy-of-a-desktop-file –  Wutaz Sep 16 '13 at 21:38
add comment

Your Answer

 
discard

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.