Results 1 to 6 of 6

Thread: Environment variables... where should they go?

  1. #1
    Associate
    Join Date
    May 2001
    Posts
    16

    Environment variables... where should they go?

    Here's the situation:

    I'm running Debian 2.2r3, with enlightenment.

    Recently I compiled the qt libraries with the idea of attempting to compile KDE afterward. *When I went to compile the KDE part, it said I should add the path to QT (in this case, /usr/local/qt) in .profile. *

    All the qt/kde paths are in my .profile file for root, and in .bash_profile for my regular user login. *However, when I su to root those variables don't show up anywhere.

    This is causing a problem when I try to set up a KDE application project using KDevelop. *It runs a configure script to make sure you have everything you need. *However, it keeps telling me that the qt version isn't high enough.

    Is there another file I have to put these paths for when I su to root?

    Thanks in advance.

  2. #2

    Re: Environment variables... where should they go?

    do you do a su - ?

  3. #3
    Associate
    Join Date
    May 2001
    Posts
    16

    Re: Environment variables... where should they go?

    No. *I put Kdevelop on an enlightenment menu and run it from there. *

    When I do an su and type
    Code:
    echo $PATH
    nothing shows up.


  4. #4

    Re: Environment variables... where should they go?

    look at /etc/profile it should look like this

    Code:
    export MINICOM="-c on"
    export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man
    export HOSTNAME="`cat /etc/HOSTNAME`"
    export LESSOPEN="|lesspipe.sh %s"
    export LESS="-M"
    export MOZILLA_HOME=/usr/lib/netscape
    export LFS="/mnt/lfs"
    
    # Set the default system $PATH:
    PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/openoffice/pro
    gram:/opt/kde/bin:/usr/local/mozilla/"
    
    # For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
    # the $PATH. Some means of connection don't add these by default (sshd comes
    # to mind).
    if [ "`id -u`" = "0" ]; then
     echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
     if [ ! $? = 0 ]; then
      PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
     fi
    fi
    
    # For non-root users, add the current directory to the search path:
    if [ ! "`id -u`" = "0" ]; then
     PATH="$PATH:."
    fi
    this is just the part where the paths get exported .. I think you should get the idea .. else just post any questions

    hth,
    chb

  5. #5

    Re: Environment variables... where should they go?

    Like pbharris pointed out, you need to do a "su -" or else you don't attain root's environment settings.

  6. #6

    Re: Environment variables... where should they go?


    Like pbharris pointed out, you need to do a "su -" or else you don't attain root's environment settings.
    nice that "-" .. at first i didnt notice that there was a minus before the su when pbharris posted it .. :-/

Similar Threads

  1. dns - variables
    By 4ever in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 02-02-2009, 09:32 PM
  2. Environment installation on slackware
    By imported_root in forum Linux - General Topics
    Replies: 3
    Last Post: 03-15-2005, 07:10 PM
  3. Reading variables...
    By Gary Penner in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 02-25-2005, 10:35 PM
  4. StarOffice5.2: Java environment
    By Blaqb0x in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 05-21-2002, 07:35 PM
  5. PHP variables
    By kornp in forum Linux - Hardware, Networking & Security
    Replies: 7
    Last Post: 05-15-2002, 03:29 PM

Bookmarks

Posting Permissions

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