0

I installed kile from offline installer and everytime I want to run it, I need to go to the install directory and then run it

cd /home/usrname/kile-install

./kile

is there anyway to add a command so that this process is automated? i.e i want to type "kile" in the terminal and it should open kile.

Edit: tried modifying .bashrc file added the following lines to .bashrc

  • PATH=PATH$:/home/usrname/kile-install/bin

  • PATH=PATH$:/home/usrname/R2009b/bin

The second one works but kile does not work.

Thanks.

2 Answers 2

2

Copy the binary file into /usr/local/bin with the following command:

sudo cp /home/username/kile-install/kile /usr/local/bin

/usr/local/bin is a folder where we usually put custom application binaries. after copying, just re-open the terminal and you should be good to go.

2
  • Not working...This is what I get: No protocol specified No protocol specified kile: cannot connect to X server :0 Nov 7, 2012 at 1:49
  • Oops! Missed the last sentence. Re-opened the terminal and it works like a charm! Thanks a lot! Nov 7, 2012 at 1:54
1

If you're installing the program for a single user only, there's no need to mess with system directories - you can configure everything in your home directory. No need to use sudo either.

Create a folder called bin in your home directory and create a symlink from your executable into that directory:

mkdir ~/bin
ln -s ~/kile-install/kile ~/bin

or, if kile needs to be started from a particular directory, create a small shell script and place it in ~/bin:

#!/bin/sh
cd /home/usrname/kile-install
./kile

If you haven't had ~/bin directory previously you'll need to log out and then log in back, but in the future it'll be added to your PATH automatically so everything you put there can be invoked without specifying the full path.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .