Bug 84167

Summary: PATH set wrong when VNC started from init.d
Product: [Fedora] Fedora Reporter: William Hooper <redhat>
Component: vncAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: fedora, gds, mseitz, redhat
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-17 18:21:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description William Hooper 2003-02-12 23:03:23 UTC
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-22 01:49:47 UTC
Still exists in FC1.  Should I file a seperate bug for it?

Comment 2 Tim Waugh 2004-11-17 17:10:51 UTC
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 23:44:48 UTC
Yep, that did the trick.  Thanks.

Comment 4 gene smith 2005-04-03 23:02:44 UTC
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.)