Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've done the following but all I get in VNC Viewer is a blank orange screen, any help appreciated.

  1. apt-get -y install ubuntu-desktop tightvncserver

  2. adduser vnc passwd vnc

  3. echo "vnc ALL=(ALL) ALL" >> /etc/sudoers

  4. su - vnc vncpasswd exit

  5. cd ~ nano .vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
. /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &

#x-window-manager &

save

THEN nano /etc/init.d/vncserver

THEN paste in the following, then save:

#!/bin/sh -e ### BEGIN INIT INFO # Provides: vncserver # Required-Start: networking # Default-Start: 3 4 5 # Default-Stop: 0 6 ### END INIT INFO PATH="$PATH:/usr/bin/" # The Username:Group that will run VNC export USER="vnc" #${RUNAS} # The display that VNC will use DISPLAY="1" # Color depth (between 8 and 32) DEPTH="16" # The Desktop geometry to use. #GEOMETRY="x" #GEOMETRY="800x600" GEOMETRY="1024x768" #GEOMETRY="1280x1024" # The name that the VNC Desktop will have. NAME="my-vnc-server" OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}" . /lib/lsb/init-functions case "$1" in start) log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}" su ${USER} -c "/usr/bin/vncserver ${OPTIONS}" ;; stop) log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}" su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}" ;; restart) $0 stop $0 start ;; esac exit 0

Then ctrl-x to save, Y for Yes, and enter to accept file name.

THEN

chown -R vnc. /home/vnc/.vnc && chmod +x /home/vnc/.vnc/xstartup sed -i 's/allowed_users.*/allowed_users=anybody/g' /etc/X11/Xwrapper.config

THEN

chmod +x /etc/init.d/vncserver && service vncserver start

THEN

update-rc.d vncserver defaults

THEN

reboot.

FINALLY: go in there with tightvnc viewer client, and voila, blank kool aid tangerine orange screen.

any help appreciated, of course it's been 3 x 8 hour evenings so far :}

share|improve this question

2 Answers 2

up vote 0 down vote accepted

you didn't set gui session for xstartup file, that is why you see blank screen when try try to remotely connect to your desktop/server via vnc on ubuntu, if you want gnome, install these packages

# apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

and use this xstartup file

#!/bin/sh

export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
share|improve this answer
    
Thanks Biana, at the end back in Feb 2014 I ended up finding instructions for something that gave me gnome core, so I gave in and went with that.. next time out I will try yours. Many thanks. –  Randal Oulton Jun 6 at 12:07

From what i've seen you cant vnc into unity. Install a different desktop environment and you'll be good. Heres how woth xfce:

https://www.digitalocean.com/community/articles/how-to-setup-vnc-for-ubuntu-12

share|improve this answer
1  
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Seth Mar 11 at 1:25
    
Quoting: From what i've seen you cant vnc into unity. Can you reference to link stating that users cannot vnc into unity? –  AlikElzin-kilaka Apr 29 at 12:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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