Bug 28318 - vnc-server starts VNC in root directory, not home directory
vnc-server starts VNC in root directory, not home directory
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: vnc (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-19 11:50 EST by David Konerding
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-06-05 05:19:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/etc/init.d/vncserver (1.65 KB, text/plain)
2001-02-19 17:29 EST, Tim Waugh
no flags Details

  None (edit)
Description David Konerding 2001-02-19 11:50:11 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.73 [en] (Win98; U)


starting the vnc-server at boot time for a user starts VNC in the root (/) directory, rather than the user's
home directory.  Whenever a user connects to the VNC server and opens a shell, it will open in
/ (I'm using fvwm2 as my window managed and rxvt as my shell) rather than the user's hme dir.

Reproducible: Always
Steps to Reproduce:
install vnc and vnc-server.  edit /etc/sysconfig/vncservers to add a user.  Start vnc using /etc/rc.d/init.d/vnc start.
Then, connect to the VNC session and start a shell.
This problem isn't exhibited with GNOME or KDE shells, presumably because they try to cd to the user's home
dir when they start.

Actual Results:  The rxvt shell starts in / instead of ~.


Expected Results:  VNC should be started from the user's home directory.  Any application that it started but
does not cd to the home dir will run from the root directory.
Comment 1 Tim Waugh 2001-02-19 17:29:01 EST
Thanks for the report.  Please try out the attached replacement for
/etc/init.d/vncserver.  'service vncserver stop' should also now work.
Comment 2 Tim Waugh 2001-02-19 17:29:26 EST
Created attachment 10420 [details]
/etc/init.d/vncserver
Comment 3 Tim Waugh 2001-02-20 11:19:43 EST
Fixed in 3.3.3r2-14.
Comment 4 Curtis Doty 2001-06-04 15:39:32 EDT
But the initscript still starts up in /root as evident by the message 
syslogged 'su: bash: /root/.bashrc: Permission denied'. Here's how I worked 
around:

--- vncserver-3.3.3r2-14        Mon Feb 19 10:27:06 2001
+++ vncserver   Mon Jun  4 12:30:22 2001
@@ -26,7 +26,7 @@
     do
         echo -n "${display} "
         initlog $INITLOG_ARGS -c \
-            "su ${display##*:} -c \"cd && [ -f .vnc/passwd ] && 
vncserver :${display%%:*}\""
+            "su ${display##*:} -c \"cd ~${display##*:} && [ -f .vnc/passwd ] 
&& vncserver :${display%%:*}\""
         RETVAL=$?
         [ "$RETVAL" -ne 0 ] && break
     done
Comment 5 Tim Waugh 2001-06-05 09:18:18 EDT
Patch applied in 3.3.3r2-16.  Thanks.

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