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.
Thanks for the report. Please try out the attached replacement for /etc/init.d/vncserver. 'service vncserver stop' should also now work.
Created attachment 10420 [details] /etc/init.d/vncserver
Fixed in 3.3.3r2-14.
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
Patch applied in 3.3.3r2-16. Thanks.