Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I just installed the LaTeX editor Kile from source on my Ubuntu 10.04 with KDE (I know it is also available in the package-manager, however if you install it from there it will install TeXLive 2009 which I don't want).

The documentation of Kile says:

You can start Kile with the following command:

KDEDIRS=$HOME/kile-install:$KDEDIRS $HOME/kile-install/bin/kile

This works fine, however it would be much more convenient to have this as a symbol-launcher on my workspace desktop.

How can I create a launcher from this command given above so that I can start Kile with a double-click on an icon?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I'm not totally familiar with KDE, but I know it's underlying launcher/menu system is the same as GNOME, Xfce4, etc. To make a launcher for any program (anything, really) make an empty text file and put this in it:

[Desktop Entry]

This is a skeleton launcher file. You can see examples in the /usr/share/applications directory. Just fill it in accordingly:

[Desktop Entry]
GenericName=LaTeX Editor
Comment=This is a menu tool tip if you want one
Exec=KDEDIRS=$HOME/kile-install:$KDEDIRS $HOME/kile-install/bin/kile
Categories=These are the menu categories if you wanted it in the menu, but not necessary for just a launcher.

Now save the file as kile.desktop

Now make the file executable. Once executable the file will change. It should now appear as the icon and name you chose rather than "kile.desktop". Double click it and your program should open.

Since you are using paths and such in your Exec= field things may not work correctly. I don't know since I've never tried. This would be easily remedied if it doesn't, so just let me know.

Hope that was helpful.

EDIT: I see that it failed to execute. I can think of 2 simple fixes. The easiest is to make the Exec= field look like this:

Exec=sh -c "KDEDIRS=$HOME/kile-install:$KDEDIRS $HOME/kile-install/bin/kile"

That should work. Another way, is to create a shell script. Make a blank text file and put this in it:

KDEDIRS=$HOME/kile-install:$KDEDIRS $HOME/kile-install/bin/kile

Save it as "" or whatever, and make it executable. Now you ought to be able to launch Kile directly by executing the file, or you can add the path to to your launcher file's Exec= field:


Also, if you put in your $PATH, such as ~/bin, you'll be able to launch Kile by typing in a terminal rather than the long command.

If none of that works then I have made a typo :)

share|improve this answer
Thank you but unfortunatelly this does not work and exits with the Error: Failes to execute child process "KDEDIRS=$HOME...." (no such file or directory) –  Martin H Dec 14 '10 at 17:20
A work-around that I found is to link to the file in /kile-install/bin/kile but this is some sort of executable and can't be opened with an editor. I would still be interested in a solution with the launcher –  Martin H Dec 14 '10 at 17:27
I have edited my answer. Let me know if that works for you! –  Deadite81 Dec 14 '10 at 17:43
If linking to the /kile-install/bin/kile file works without needing the other stuff simply add that as your Exec= field rather than the long command. –  Deadite81 Dec 14 '10 at 17:45
Thank you very much. The change to EXEC=sh - c... did it. I haven't tried the appraoch with the sh file, but I can't see why this shouldn't work. –  Martin H Dec 15 '10 at 14:40

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.