This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 24739 - Path for root when entering init5 automatically incorrect
Path for root when entering init5 automatically incorrect
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: xinitrc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-23 16:14 EST by Need Real Name
Modified: 2007-04-18 12:30 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-16 06:04:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-01-23 16:14:04 EST
When the system is configured to enter init 5 automatically upon boot and 
you log in as root, the path is different compared to logging in at a 
different terminal, or logging in when booting to init 3.  The /usr/sbin 
directory is left off of the path.
Comment 1 Mike A. Harris 2001-01-28 15:57:19 EST
Are you logging in to xdm/gdm/kdm as root?  Or are you loggin into X as
a user and then either ssh'ing or su'ing to root?  I could not
replicate this problem.  If I start in runlevel 5, and log in as root,
then open an xterm, I don't have this problem.

Can you give me the exact specifics of your X configuration, GDM/KDM, etc.
and instructions on replicating the problem including all programs executed,
etc.
Comment 2 Need Real Name 2001-01-29 16:53:02 EST
My system by default boots up in as init 3.  If I log in as the root account 
and do an export, my PATH 
is /usr/local/sbin:/usr/sbin:/sbin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/loc
al/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin.  
If I now run 'init 5' (boots into KDE, so must be KDM I am assuming), my PATH 
is /bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/kde2/bin:/usr/lib/kde2.  If I set my 
system to boot into runlevel 5 and reboot the system, I get the latter path as 
well.  Could this be something with KDE?  I have verified this on 2 machines.
Comment 3 Need Real Name 2001-01-29 16:56:36 EST
Another note, when in X, I am checking the path from a terminal created by the 
icon on the KDE bar.
Comment 4 Mike A. Harris 2001-02-06 17:54:55 EST
Bero, could you look into this, it looks like it may be a KDM problem.  I
can't find how the path gets set in the KDM case, and so I'm not sure where
a fix would be.  I also haven't replicated it yet.
Comment 5 Need Real Name 2001-03-16 06:03:57 EST
I think this is the same as my problem. I am using KDE (RedHat 7.0) but I have
the same problem if I try Gnome. 
If I use the graphical login (run level5) the /etc/profile and ~/bash_profile
files do not seem to be read and any alterations to the PATH made in them are
not reflected in the bash shell when running a printenv command. However this
applies to any user and not just root.
If I don't use the graphical login and start the machine in run level 3, then
all is well and the files are read.
It seems like the shells are never login shells if the graphical login screen is
used. I can get round generally by adding export commands to the .bashrc but run
into problems if trying to use not interactive shells because then the .bashrc
is not read (such as compiling from within xemacs - at least I think this is how
xemacs does its compilation).
Comment 6 Mike A. Harris 2001-03-19 16:11:58 EST
If you want a login shell, you must specify it on the commandline of
xterm/eterm/rxvt/whatever.

Note You need to log in before you can comment on or make changes to this bug.