Bug 114139 - vncserver service does not load appropriate profile
Summary: vncserver service does not load appropriate profile
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: vnc
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: David Lawrence
Depends On:
Blocks: 189875 221830
TreeView+ depends on / blocked
Reported: 2004-01-23 00:11 UTC by Zach Gorman
Modified: 2013-04-30 23:33 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2007-02-08 20:07:34 UTC

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0034 normal SHIPPED_LIVE vnc-server bug fix update 2007-06-11 19:17:46 UTC

Description Zach Gorman 2004-01-23 00:11:44 UTC
Description of problem:
When starting vncserver automatically on boot 
using /etc/sysconfig/vncservers and the vncserver service, the users' 
profiles are not loaded. As a result, each vncserver session is run 
using root's profile instead.

Version-Release number of selected component (if applicable):
RHEL3 fully up2date as of 22 Jan 04

How reproducible:

Steps to Reproduce:
1. edit /etc/sysconfig/vncservers to add a user:
2. run "service start vncserver"
3. log in to the vnc server, open a termainal and type env | grep 

Actual results:
Path is missing several entries, including /usr/local/bin

Expected results:
Complete, working path (the same path you would get if you did "su - 

Additional info:
The problem is that the su command in /etc/init.d/vncserver doesn't 
specify the " - " option. Therefore, the user's profile is never 

To fix, change:
"su ${USER} -c \"cd ~${USER} ...
"su - ${USER} -c \"cd ~${USER} ...

This is similar to bug 100706 for RH9

Comment 5 Rainer Traut 2007-01-02 14:02:27 UTC
The same applies to EL4:

initlog $INITLOG_ARGS -c \
            "runuser ${USER} -c \"cd ~${USER} && [ -f .vnc/passwd ] && vncserver

should be:

      initlog $INITLOG_ARGS -c \
            "runuser -l ${USER} -c \"cd ~${USER} && [ -f .vnc/passwd ] &&
vncserver :${DISP} ${VNCUSERARGS}\""

Comment 12 Red Hat Bugzilla 2007-02-08 20:07:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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