Bug 84167 - PATH set wrong when VNC started from init.d
PATH set wrong when VNC started from init.d
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: vnc (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-12 18:03 EST by William Hooper
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-17 13:21:11 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 William Hooper 2003-02-12 18:03:23 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461)

Description of problem:
PATH for user "whooper" when logged in via SSH:
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/whooper/bin

PATH for user "whooper" under an xterm in VNC (started from /sbin/service 
vncserver start):
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin

This cause problems when trying to run apps that normally use consolehelper 
(up2date, setup, redhat-config-*) because the directory order is wrong.

Also present in the Phoebe2 beta.  Not sure about RH 8.0, but I assume it is 
there, too.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Start VNCserver (/sbin/service vncserver start)
2. Open a term
3. Look at environment (printenv)
    

Actual Results:  PATH with /sbin in front of /bin, etc.

Expected Results:  Same PATH as other logins (console, ssh, telnet, etc.)

Additional info:

Adding the "-l" option to the su line in the /etc/init.d/vncserver script makes 
the PATH:

PATH=/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/whooper/bin

Which is probably "close enough".
Comment 1 William Hooper 2004-02-21 20:49:47 EST
Still exists in FC1.  Should I file a seperate bug for it?
Comment 2 Tim Waugh 2004-11-17 12:10:51 EST
Should be fixed in 4.0-9: I added '-l' to the runuser call as you suggested.

Although I don't think this needs an update for FC3, I've made the change in CVS
for any future updates that might be made for vnc in FC3.

Please confirm that it fixes it for you.  It will be in Fedora development tomorrow.
Comment 3 William Hooper 2004-11-21 18:44:48 EST
Yep, that did the trick.  Thanks.
Comment 4 gene smith 2005-04-03 19:02:44 EDT
Would be nice if this was in the fc3 updates since it bit me. Had to manually
add the -l before the -c in the first runuser to get correct PATH in xterms
automatically. (Note to readers: fc3 apparently no longer uses su but runuser as
described above.)

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