Using Ubuntu 12.04. I would like to choose kile as the default application for tex files, but I run into problems. I go through
"right click" -> properties -> open with -> show other applications
but kile is not in the list, so how can I choose kile?
Am I missing something obvious?
The answer given by Yusuf is correct but in my case it was incomplete. Since I had no
Kile.desktop
file in my/usr/share/applications
(the.desktop
association is hidden, as Cumulus007 points out), I had to create it and simply writingExec=kile %F
isn't enough. This is what I put inside theKile.desktop
file I created using Yusuf's instructions:This finally allowed me to select
Kile
as the default application to open.tex
files.Open the application desktop file in /usr/share/applications and check if the "Exec" line end with this value: "%F". If that is not the case, then you'll have to append this value to this line. Here is the command used to edit the desktop file:
change the exec line from
to
and then Kile appears in the list.
Open the application desktop file (in this case,
kile.desktop
) in "/usr/share/applications" and check if theExec
line ends with this:%F
. If that is not the case, then you'll have to append this value to this line (with a prepending space, if needed). Here is the command used to edit the desktop file:or
Here kde4 might be something else.
change the exec line from:
to:
and then Kile should appear in the list.
Kile isn't default in "Ubuntu". You need to install it (and its Qt/KDE dependencies) yourself using a Software manager or
sudo apt-get install kile
. If you wish, you can first runapt-get install -s --no-install-recommends kile
to see, as a simulation, what else will come with Kile even without the recommends.After you've installed Kile, it's possible you still won't see it as an option in the context menu as you have experienced. That may be a consequence of missing a
.desktop
file as described in detail here: How do I set kile as the default application for .tex files?.My situation was a little different, but I believe the answer could be helpful here.
I am using ubuntu 16.04; the default application for opening .tex files was RStudio (i.e. when double-clicking on a tex file, it was opened in RStudio). The
kile.desktop
file already had theExec=kile %F
ending. To open a foo.tex file with kile (or texmaker) I had to right-click, and choose open with.The permanent solution to change the deafult program for me was:
Properties
Open With
set as default
I don't know how to do this in the command line.