Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1871  / 2 Years ago, sun, june 19, 2022, 6:40:44

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.


More From » 12.04

 Answers
2

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.


[#34427] Sunday, June 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fieldcheon

Total Points: 24
Total Questions: 105
Total Answers: 109

Location: Western Sahara
Member since Tue, Feb 16, 2021
3 Years ago
;