Bug 84167 - PATH set wrong when VNC started from init.d
Summary: PATH set wrong when VNC started from init.d
Alias: None
Product: Fedora
Classification: Fedora
Component: vnc
Version: 3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-02-12 23:03 UTC by William Hooper
Modified: 2007-11-30 22:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2004-11-17 18:21:11 UTC
Type: ---

Attachments (Terms of Use)

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 for user "whooper" under an xterm in VNC (started from /sbin/service 
vncserver start):

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:

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:


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.)

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