Find the answer to your Linux question:
Results 1 to 7 of 7
Hello! Can someone help me with these applicatoin-related questions? I am using Fedora Core 5. 1) Where do we configure what application is executed when we type something in terminal? ...
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Posts
    7

    Basic Application Questions! Help!

    Hello!

    Can someone help me with these applicatoin-related questions? I am using Fedora Core 5.

    1) Where do we configure what application is executed when we type something in terminal? I read somewhere about $path. Where is it located and how do I configure it?

    2) Is there an easy way to remove/uninstall programs? How am I able to do so cleanly without leaving any traces?

    3) Is there any possibility of clashes if I install a package using yum and if I were to make and install the source? Is there any checking during the installs?

    Appreciate your help!!

  2. #2
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    This should help -
    1) Where do we configure what application is executed when we type something in terminal? I read somewhere about $path. Where is it located and how do I configure it?
    1. It's in the $PATH variable. Much like in windows it is in the %path% variable. Note the case sensitivity. To check the variable's contents in a terminal run
    Code:
    echo $PATH
    . To update it try
    Code:
    PATH=$PATH:/new/path/to/add
    If this works in your terminal session you can update it in /etc/profiles, which is the profile script run for users on login.

    2) Is there an easy way to remove/uninstall programs? How am I able to do so cleanly without leaving any traces?
    2. There are a few ways and it depends on distros. I see you mentioned Fedora so as you said yum will do the job for you. After you remove an application you can remove the config files by going into the home directory of any users that ran the application and removing their hidden/file/directory for that app. For example for beryl remove the .beryl folder in your home directory.

    3) Is there any possibility of clashes if I install a package using yum and if I were to make and install the source? Is there any checking during the installs?
    3. Source and package manager installs tend to ignore each other. Only install from source if you have a good reason to and are willing to take on management of the application yourself. These days package management is excellent and there is rarely a need to use source.

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    1) Where do we configure what application is executed when we type something in terminal? I read somewhere about $path. Where is it located and how do I configure it?
    Code:
    echo $PATH
    its defined in /etc/profile file and you can modify/add path using 'export' command in '.bashrc' file of your 'home' folder.

    2) Is there an easy way to remove/uninstall programs? How am I able to do so cleanly without leaving any traces?
    Code:
    rpm -e <package name>
    or
    yum remove <package name>
    OR use Yum Extender. its GUI of 'yum', makes things lot easier.

    3) Is there any possibility of clashes if I install a package using yum and if I were to make and install the source? Is there any checking during the installs?
    no need to complie the source if package is available in repositories. most packages are available in freshrpms and livna repos. yum takes care of versions.
    in case, you are planning to compile and install manually, check version of installed package.
    Code:
    <package> --version


    EDIT: bigtomrodney is fast.



    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. #4
    Just Joined!
    Join Date
    Nov 2006
    Posts
    7
    Quote Originally Posted by bigtomrodney
    If this works in your terminal session you can update it in /etc/profiles, which is the profile script run for users on login.
    Thanks Tom and Casper for your quick replies!

    Can you tell me more about etc/profile? I have found it, but where exactly do I add the new paths?

    Is it here?

    # Path manipulation
    if [ "$EUID" = "0" ]; then
    pathmunge /sbin
    pathmunge /usr/sbin
    pathmunge /usr/local/sbin
    fi

    Quote Originally Posted by bigtomrodney
    After you remove an application you can remove the config files by going into the home directory of any users that ran the application and removing their hidden/file/directory for that app. For example for beryl remove the .beryl folder in your home directory.
    I am not familiar with the Linux dir structure. Is it true that all application files will be installed to /usr/share/ or /usr/local/ dirs? So I just need to locate the corresponding app dirs there?

    Quote Originally Posted by bigtomrodney
    3. Source and package manager installs tend to ignore each other. Only install from source if you have a good reason to and are willing to take on management of the application yourself. These days package management is excellent and there is rarely a need to use source.
    Is it possible to yum using special ./configure parameters? And is it possible to update an installed yum using these parameters? Also, if I were to use the yum remove, can I assume that it is a relatively clean uninstall and if I were to reinstall using yum, it would set everything back to defauts?

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Quote Originally Posted by andrew_here
    Can you tell me more about etc/profile? I have found it, but where exactly do I add the new paths?
    dont edit /etc/profile file. its a common file for all users. to set path for a specfic user, edit .bashrc file in User's Home folder.
    its not recommended to add Path of *any/all* folders in PATH variable. you can navigate to particular folder in terminal/konsole and execute commands/scipts from there only.
    as i suggested earlier, you can add path using export command. add it in .bashrc file.
    Code:
    PATH=$PATH:/path/of/new/folder
    export PATH
    Quote Originally Posted by andrew_here
    I am not familiar with the Linux dir structure. Is it true that all application files will be installed to /usr/share/ or /usr/local/ dirs? So I just need to locate the corresponding app dirs there?
    yes ! all application files are installed in /usr/bin, usr/sbin or /usr/local/bin folders. dont add/delete files manually in these folders. check this link for more details on File Structure in Linux.

    Quote Originally Posted by andrew_here
    Is it possible to yum using special ./configure parameters? And is it possible to update an installed yum using these parameters?
    NO.

    Quote Originally Posted by andrew_here
    Also, if I were to use the yum remove, can I assume that it is a relatively clean uninstall and if I were to reinstall using yum, it would set everything back to defauts?
    yes !





    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #6
    Just Joined!
    Join Date
    Nov 2006
    Posts
    7
    Quote Originally Posted by devils_casper
    dont edit /etc/profile file. its a common file for all users. to set path for a specfic user, edit .bashrc file in User's Home folder.
    its not recommended to add Path of *any/all* folders in PATH variable. you can navigate to particular folder in terminal/konsole and execute commands/scipts from there only.
    as i suggested earlier, you can add path using export command. add it in .bashrc file.
    Thanks for all the insights. The article you recommeneded on the file hierarchy was really interesting!

    However, I can't find .bashrc. I have logged in as root. Does root have it's own .bashrc?

  7. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Quote Originally Posted by andrew_here
    However, I can't find .bashrc. I have logged in as root. Does root have it's own .bashrc?
    No. why you need to add path for 'root'? PATH variable already has path of all the necessary folders required for Administrative Tasks.
    its not recommended to log in as root user and do regular stuff. 'root' login is for Administrative Tasks only.
    log in as 'normal user' and add path in normal user's .bashrc file. you can gain 'root' privileges through 'su' command.





    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...