Bug 24739 - Path for root when entering init5 automatically incorrect
Summary: Path for root when entering init5 automatically incorrect
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: xinitrc
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-23 21:14 UTC by Need Real Name
Modified: 2007-04-18 16:30 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-03-16 11:04:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-01-23 21:14:04 UTC
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 20:57:19 UTC
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 21:53:02 UTC
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 21:56:36 UTC
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 22:54:55 UTC
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 11:03:57 UTC
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 21:11:58 UTC
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.