I installed tightvncserver, started the service, logged in remotely with no issues. I created a file in /etc/init.d/ called vncboot.

# Provides: vncboot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC Server at boot time
# Description: Start VNC Server at boot time.

#! /bin/sh
# /etc/init.d/vncboot


export USER HOME

case "$1" in
  echo "Starting VNC Server"
  #Insert your favoured settings for a VNC session
  /usr/bin/vncserver :1 -geometry 1440x900 -depth 24 
  /usr/bin/vncserver :2 -geometry 1280x800 -depth 16 

  echo "Stopping VNC Server"
  /usr/bin/vncserver -kill :0

  echo "Usage: /etc/init.d/vncboot {start|stop}"
  exit 1

exit 0

I ran the file several times and it worked just fine. It started and stopped the service as it was supposed to.
Then I added the file to start with the raspberry pi with

sudo update-rc.d vncboot

After this the screen goes to white login screen asking for login, password, and a dropdown list with: Default Xsession, LXDE, OpenBox. When I put in the correct login the screen goes black, then back to the login page. If I put in incorrect login info, I get a prompt that says incorrect.

I can ssh into the machine just fine. Any ideas of what happened or how I can fix this? Thanks.

  • 1
    Update - This post raspberrypi.org/forums/viewtopic.php?f=27&t=36114 helped me. I used Ctrl+Alt+F1 to get login prompt, df -h to check size, finally sudo startx to bring up the gui However, when I restart, it still goes to that white screen.
    – Matt
    Apr 23, 2015 at 23:25
  • 1
    Why are you starting two extra vnc servers on DISPLAYs numbered :1 and :2 with different screen resolutions with the "start" script action (which seems reasonable) but killing the primary one that a local user will be using (on DISPLAY :0) with the "stop" action? Note: now that the default Jessie install of Raspbian uses systemd rather that SysV init the way you invoke tightvnc may need revising... 8-(
    – SlySven
    Jan 24, 2016 at 15:41

5 Answers 5


changing the ownership of .Xauthority file should fix the issue.

$sudo su
#chown pi:pi .Xauthority

After reboot, the login prompt doesn't appear.


I had the exact same problem. I followed these directions (here) which are . . .

cd ~
ls -l -a
mv .Xauthority .Xauthority.bkp

If you reboot, should solve the problem.


You can give xrdp a try. I have used it some time before and it worked very nicely for me.


I also encountered the same problem and got it solved by using the following commands:

cd ~
ls -l -a
mv .Xauthority .Xauthority.bkp

After reboot, the login prompt doesn't appear.


I had the same issue. It was because I did not have enough memory. Do the following

sudo apt-get autoclean
sudo apt-get clean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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