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

This question already has an answer here:

I am currently trying to use texstudio as the default application for opening *.tex files, but I cannot change the default application associated with that file type.

I tried to change it by right-clicking on the .TEX file, then Properties, Open with, Show other applications. However, neither texmaker nor texstudio will appear in the programs list and oddly enough, there is no "add application" button anymore.

I tried to make an entry in my /home/user/.local/share/applications/mimeapps/mimeapps.list but nothing happened.

Is there no way to change the list of "other applications" or add an default application program manually?

share|improve this question

marked as duplicate by Lucio, Pilot6, A.B., Eric Carvalho, mikewhatever yesterday

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

What you need it to add this line to ~/.local/share/applications/defaults.list

text/x-tex=TEXOPENNER.desktop

which in your case is:

text/x-tex=texmaker.desktop

That should work.

:-)

share|improve this answer

From what I've read here:

Create an texstudio.desktop file in ~/.local/share/applications/ with the following content:

[Desktop Entry]
Name=TexStudio
Comment=Edit TEX files
Exec=texstudio %f
Terminal=false
Type=Application
Icon=texstudio
Categories=TextEditor;
StartupNotify=true
MimeType=text/x-text;

On file browser, you can right click a .tex file for the context menu and choose Open With -> Other Application. Click on Show other applications and you should see this dialog with this:

Choosing Texstudio

You may have to change the Exec line, I am not sure if that would be the right application name.

share|improve this answer

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