Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

How to install Kile on Mac OS X UNIX
If you have ever used linux with KDE and you are writing on Latex, I am certain that you can recognise Kile as the best Latex editor around. This is a guide on how to use the excellent KDE Latex editor Kile on Mac OS X 10.4.10 (it should also work for 10.3) via Fink, MacTex, and Apple's X11. An Automator script wraps the appropriate commands up and lets you place Kile in your Applications folder. I used the latest KDE 3.5.8. wbr I will try to make this as analytic as I can, since I have not seen any other guide that delivers the full Kile power in Mac OS X.

NOTE: Before following this tutorial and if you do not desperately want Kile, try Texmaker. It may meet your needs.

Conventions: Any line starting with $ is a Terminal command that needs to be copied and pasted into Terminal (without the $), and then press Return to run it.

Requires: A broadband connection (it is a large download) and at least three hours' worth of patience. Apple's X11 and generally the Developer Tools are also required. You can install both from the OS X install CDs. I have not tried it, but XFree86 (the open source X11 on which Apple's one is based upon) should work equally well.

Read on for the detailed how-to.

A. The KDE bit using Fink.
  1. Download and install Fink, including Fink Commander. (You can do everything below using Fink Commander, which is a GUI tool for Fink.)
  2. Open Applications » Utilities » Terminal, and enter each of these commands:
      $ fink scanpackages
      $ fink selfupdate-rsync
      $ fink update-all
  3. Now you need to configure Fink to use the unstable tree and to not download binaries. Type fink configure in Terminal, and then...
    • press Return until the question "Should Fink try to download pre-compiled packages from the binary distribution if available?" comes up. Answer N and press Return.
    • To the next question about the unstable tree, answer Y and press Return.
    • For all the other questions, just press Return until 'fink configure' exits.
  4. Repeat step two.
  5. Type fink install kdebase3 kdegraphics3 aspell aspell-en kdvi kpdf kile in Terminal, and press Return to all the questions so that the default answers are used. Then do something else, have a coffee, do your shopping or your laundry while Fink downloads and compiles KDE for you. It took almost three hours on my MacBook Pro 2.4Ghz Core2Duo with 4GB RAM.
That last command installs everything that Kile needs to work. We are installing KDE from the unstable tree, but we told fink that we want to recompile it and use no binary packages that usually break the installation up.

B. The Latex bit.
  1. I wanted to use the MacTex Latex distribution with Kile rather than the default teTex that is installed by Fink. I have two reasons for this:
    1. MacTex contains TexShop and TexLive 2007, whch is a more up-to-date Latex distro than teTex (teTex is not maintained as of May 2006)
    2. I would like my Latex configuration (e.g custom .sty, .bst etc. files) to be directly available to Kile by issuing sudo texhash in Terminal.
  2. Download MacTex from and install it.
However, the Latex distribution to be used remains your choice, and teTex or any other Latex distribution could be used equally well.

C. The final bit.
  1. Create a file named .bashrc in your home directory and add this line:
    Save the file when done. This file tells xterm where it can find the Latex executables, Kile, Kpdf, Kdvi etc.

    The order in the path name above is necessary to be kept because I want Kile to use the TexLive 2007 executables rather than the teTex ones which were installed by fink. If you have any other Latex distribution, you can replace /usr/texbin with the path to your Latex executables directory.
  2. Open Aplications » Automator. Choose the Automator Library and from the next column drag the 'Run Shell Script' action to the right field. In the text box type:
      /usr/bin/open-x11 /sw/bin/kile;
    Then press Command-S. Give your workflow the name Kile, and choose its File Format to be Application and save in Applications.
You are done. Click on Kile in /Applications. Aaaahh, I almost forgot. The icon ... grab this image, and then use img2icns to convert the .png to .icns. From there, I am sure you know how to change the icon.

D. Inside Kile.
  1. If everything is OK, then Settings » System check should return with success, except for acroread, but who needs it? Also, all the embedded viewers KDVI, KPDF work.
  2. The aspell program is used for a spell checker (it is better than the default ispell in unix).
  3. I keep the default configuration of shortcuts in Kile. If you wish otherwise, you have to play with the Settings » Configure Shortcuts screen to make shortcuts that meet you specific needs.
  • The Automator script calls kile via the open-x11 command that first appeared on Mac OS X 10.3.
  • Opening the, an xterm appears that is being killed. If you do not mind having it on your desktop (I actually use it a lot), close it.
  • Kile depends highly on KDE. That is why the kdeinit processes are being called. After closing kile, they are going to stay active for a few seconds and die since they're unused.
  • If everything went awfully wrong do not worry. Just issue the command sudo rm -r /sw. This will remove everything Fink istalled, including Fink itself.
  • If you want to play with KDE, go to Applications » Utilities » X11. In the xterm, type:
      Xnest :1 -geometry 1024x768 & xterm -display :1
    In the xterm within the nest, type startkde, then have fun!
  • I really hope this tutorial is useless in a couple of months when KDE4 is released. See this entry in the Road to KDE 4 report for more details.
[robg adds: I have not tested anything in this hint...]
  • Currently 3.20 / 5
  You rated: 3 / 5 (10 votes cast)

How to install Kile on Mac OS X | 6 comments | Create New Account
Click here to return to the 'How to install Kile on Mac OS X' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to install Kile on Mac OS X
Authored by: suchire on Oct 30, '07 09:57:24AM

Why use Kile or Texmaker when you can just use TeXShop, which Just Works?

[ Reply to This | # ]
How to install Kile on Mac OS X
Authored by: matthiasr on Oct 30, '07 11:37:30AM

Because somebody might just want to?

[ Reply to This | # ]
How to install Kile on Mac OS X
Authored by: jochen KĆ¼pper on Oct 30, '07 04:05:21PM

Why don't you use Aquamacs, which is way more powerful and installs out of the box from its dmg?

[ Reply to This | # ]
How to install Kile on Mac OS X
Authored by: thelamecamel on Oct 31, '07 01:20:19AM

Textmate (not free) does everything Kile seems to do (though it's BYO PDF or DVI viewer), plus you can drag and drop images into your .tex file and it will fill out all the figure code for you, letting you tab between options like htbp, scale, caption and label.

It also works out of the box with gwTeX and is also supposed to with MacTeX (though I haven't tried that distro)

[ Reply to This | # ]
How to install Kile on Mac OS X
Authored by: yiannis on Oct 31, '07 05:18:44AM

This tutorial is not intended to be used on Mac OSX 10.5 yet due to an Apple-related bug in linking with OpenGL. The necessary package poppler does not compile and some extra configuration is needed.

There is a recommendation in fink wiki on how to overcome the issue but I could not make it work.
I am trying to overcome the issue and post back.

If anyone has an idea how this could be done it would be highly appreciated.

[ Reply to This | # ]
How to install Kile on Mac OS X
Authored by: mjmarq on Sep 11, '12 02:11:52PM

Did anyone install kile on Mountain Lion?.
I followed all steps (using fink- as the valid version for Lion) and then for fink install kdebase3 ... kile the problem is that I got the message: "failed: no package found for specification 'kile'"

Anyone could help me?

Thanks a lot

[ Reply to This | # ]