How can I have new ~/.vnc/xstartup files be configured for normal desktop by default?
37,041
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
Related videos on Youtube
![Belmin Fernandez](https://i.stack.imgur.com/aq9Ax.jpg?s=256&g=1)
Comments
-
Belmin Fernandez almost 2 years
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?
-
Serge over 11 yearsJust uncomment these two lines and restart your vncserver. Your default desktop will be started by vncserver
-
Belmin Fernandez over 11 yearsI want it to be done by default for all new users. I.e., change the default
~/.vnc/xstatup
that is created. -
Serge over 11 yearsThis is not clear from your question :) wait a second...
-
Belmin Fernandez over 11 yearsAny suggestions on how to make the question clearer (seems like you already have my answer but for others visiting the site :-)).
-