Fixing the VNC's blank/grey screen with three checkboxes problem (~/.vnc/xstartup in Ubuntu)

12:50 PM Unknown 3 Comments

After installing VNC server on Ubuntu (usually occurs on servers), sometimes one may face a problem in which after logging in by a VNC client/viewer, it shows just a blank screen with three checkboxes. (See the image at the end of post)

To fix this issue, first of all, Check if you have any Desktop Environment (eg, Unity, Gnome, KDE, xfce, lxde etc) installed on your system. You may use: echo $DESKTOP_SESSION or you can verify from env.

In my case, I have installed LXDE on Ubuntu server. It is important now to find the exact executable path of lxde, which is /usr/bin/startlxde in my case.

Replace the content of your ~/.vnc/xstartup and paste following lines:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
/usr/bin/startlxde
Note: Above code is only valid for lxde.

Should work fine now! :)



3 comments :

  1. I think you are going to want to add vncconfig -iconic &
    this way, you get the copy and past from other environments.

    ReplyDelete
  2. Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. round screen printing machine

    ReplyDelete
  3. When I tape echo $DESKTOP_SESSION nothing appears!!
    I have the same issue

    ReplyDelete