6

When a user first runs vncserver, the following ~/.vnc/xstartup file gets created:

#!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # 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 & 

I want to modify the default file so that the following lines are uncommented:

unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc 

How should I go about this?

4
  • Just uncomment these two lines and restart your vncserver. Your default desktop will be started by vncserver Commented Oct 26, 2012 at 15:02
  • I want it to be done by default for all new users. I.e., change the default ~/.vnc/xstatup that is created. Commented Oct 26, 2012 at 15:05
  • This is not clear from your question :) wait a second... Commented Oct 26, 2012 at 15:07
  • Any suggestions on how to make the question clearer (seems like you already have my answer but for others visiting the site :-)). Commented Oct 26, 2012 at 16:26

1 Answer 1

7

Create a file /etc/vnc/xstartup with the following content:

#!/bin/bash unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc 

And give it the read and execution permissions to all users:

chmod 0755 /etc/vnc/xstartup 

Then this script will be executed by any user's vnc server

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.