LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-26-2002, 03:28 PM   #1
SigningiS
LQ Newbie
 
Registered: Sep 2002
Location: SLC
Distribution: Debian
Posts: 6

Rep: Reputation: 0
question about $PATH


I just edited my systemwide $PATH but is won't show up in KDE. Ugh, let me splain it this way...

I changed /etc/profile to include another directory in the path. In console (ie tty1, tty2...) when I echo $PATH, it shows up. When I try to do that in KDE with konsole it doesn't show up. What have I done wrong? Did I miss a step?
 
Old 09-26-2002, 03:38 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 58
Your path doesn't reload until you restart your shell, and in the case of being logged into X, means restarting the shell that started X. Rebooting or going to runlevel 1 or 3 and then back to 5 should get it right.

Cheers,

Finegan
 
Old 09-26-2002, 03:50 PM   #3
SigningiS
LQ Newbie
 
Registered: Sep 2002
Location: SLC
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
Done that

I have rebooted. :( That's part of what makes this so annoying.
 
Old 09-26-2002, 04:01 PM   #4
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 58
Okay... I'm way off then, hmm... stuck at work, I'll check to see if Konsole keeps a seperate path file somewhere. Is this just Konsole, or do Xterm and Eterm do this too?

Cheers,

Finegan
 
Old 09-26-2002, 05:09 PM   #5
SigningiS
LQ Newbie
 
Registered: Sep 2002
Location: SLC
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
xterm and eterm

Xterm doesn't reflect the change but Eterm does!!
 
Old 09-29-2002, 04:53 PM   #6
SigningiS
LQ Newbie
 
Registered: Sep 2002
Location: SLC
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
Relegated to the bottom of the heap....
:(
Can anyone help me?
 
Old 09-30-2002, 06:01 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Maybe look for /etc/ profile.d/kde*.sh and see if the path statement there correlates with your /etc/profile's.
 
Old 10-01-2002, 05:36 PM   #8
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 48
What shell are you running in xterm? what shell in eterm?

printenv | grep -i shell
 
Old 10-01-2002, 07:23 PM   #9
SigningiS
LQ Newbie
 
Registered: Sep 2002
Location: SLC
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by moses
What shell are you running in xterm? what shell in eterm?

printenv | grep -i shell

Both are bash.
 
Old 10-01-2002, 07:23 PM   #10
SigningiS
LQ Newbie
 
Registered: Sep 2002
Location: SLC
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by unSpawn
Maybe look for /etc/ profile.d/kde*.sh and see if the path statement there correlates with your /etc/profile's.
I couldn't find anything like that.
 
Old 10-01-2002, 08:29 PM   #11
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 58
/etc/profile.d/kde.sh

Mine says:

#!/bin/sh
# KDE additions:
KDEDIR=/opt/kde
PATH=$PATH:$KDEDIR/bin
export KDEDIR PATH
bob@tyler:/etc/profile.d$ pwd
/etc/profile.d

So changing that PATH line to:

PATH=$PATH:$KDEDIR/bin:/usr/somewhere/weird/and/abnormal

Should work... if not run a locate on kde.sh and see what bizarre place Debian puts it.

Cheers,

Finegan
 
Old 12-15-2002, 07:58 AM   #12
Donald1000
Member
 
Registered: Oct 2002
Location: Germany
Distribution: Debian, Non-Linux: Solaris, FreeBSD
Posts: 107

Rep: Reputation: 15
I got the same problem after i have install j2sdk in /usr/local/develop. I've set the path in /etc/profiles and in console erverything works good. But with the same User in KDE (with every bash): "command not found" I'm using KDE 3.0. There is no kde.sh file on the system.
Does anyone have an idea?

Thanks!
 
Old 12-16-2002, 12:49 AM   #13
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,186

Rep: Reputation: 52
it seems like i remember different scripts are run
depending on whether you are logging in or starting
a new shell. I think you can force the login scripts to
run with like bash --login. i can't remember which
files you edit to add path stuff to a new shell, but
if you open a shell, then run bash --login, it should
set up like you just logged in.
 
Old 10-26-2003, 11:30 AM   #14
gunnar.r
LQ Newbie
 
Registered: Oct 2003
Location: Trondheim, Norway
Distribution: Debian unstable
Posts: 3

Rep: Reputation: 0
Lightbulb My shell works. Does yours?

Quote:
Originally posted by whansard
it seems like i remember different scripts are run
depending on whether you are logging in or starting
a new shell.
I was wondering why my changes to $PATH wasn't reflected in xterm or konsole. I was searching for this on http://www.alltheweb.com, when I found this old thread.

I had a look in the files, and they say so themselves:
Quote:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
Quote:
# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
I made the canges in .bashrc instead of .bash_profile, and now bash set the correct path every time. The drawback is that if I run an xterm from the konsole, the path is appended to itself AGAIN. I guess it doesn't take more than a simple test to fix. I may post the fix when I find it.
 
Old 10-26-2003, 01:34 PM   #15
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 58
If I remember right, bash 2.05b reads from the following, in order...

/etc/profile
~/.bash_profile
~/.bash_login
~/.profile (old school unix standard)

and no matter what will always read ~/.bashrc

How are you declaring additions to the path?

PATH=$PATH:/usr/X11/bin

for instance?

Cheers,

Finegan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PATH question satimis Linux From Scratch 5 09-15-2005 10:23 AM
Another $PATH question iamnilo Fedora 2 09-13-2004 03:02 PM
question about $PATH drewski Linux - General 2 01-06-2004 02:17 AM
Question on path PatC Linux - General 1 07-09-2002 09:17 AM
Question about PATH? eddielins Linux - General 6 04-02-2001 08:18 AM


All times are GMT -5. The time now is 07:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration