If I uncomment the two lines in my ~/.vnc/xstartup that enable 'normal' desktop environment for VNC, the vncconfig -iconic & command is ignored:


# Uncomment the following two lines for normal desktop:
#exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

If run without the desktop environment in VNC, the config is called, and my VNC clipboard works fine.

I would like to run the desktop environment and still have vncconfig loaded.

Any ideas why this happens?


It is normal because the exec command means "stop executing this script and replace it (in memory) by the command parameter script".

If you uncomment the exec /etc/X11/xinit/xinitrc line, everything after that line will never be executed.

I do not know the content of your /etc/X11/xinit/xinitrc so I cannot be exhaustive but, probably, you need to carefully read it and copy in ~/.vnc/xstartup the minimal needed configuration (instead of uncommenting the exec line).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.