Sir FICO
Posts: 31
Joined: Sat Nov 07, 2015 11:34 pm

VNC black X cursor

Sun Sep 24, 2017 12:34 am

I know this has happened before and previously with tightserver I solved this by creating an xstartup file in .vnc with -cursor_name left_ptr in it.

Now I have a new stretch image on my new Pi3 with a raspberry touchscreen. Using the VNC that now comes with raspian (configured 'on' in preferences), if I use vnc on my mac with the ip address or the ip address followed with :0 then I get a mirrored screen as per touchscreen with a normal cursor (and the same rather large screen resolution as per touchscreen - despite the setting in the set resolution option). However I can get a different vnc screen, which is what I want, with a different resolution when I issue the following command

$ vncserver :1 -geometry 1920x1080 -depth 24 -dpi 96

and then I vnc from my Mac to x.x.x.x:1 and up comes the VNC screen OK but blast it that blooming big black X cursor is back again. This time creating an xstartup file had no effect. (I did reboot)

Does any know how to get back to a normal cursor in my second VNC screen session.

dgordon42
Posts: 764
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: VNC black X cursor

Sun Sep 24, 2017 9:40 am

I have also had the problem of the 'X' mouse pointer when running the 'vncserver' command on a headless Pi running Stretch.
After a bit of searching, I came across this fix:
Copy the '/etc/vnc/xstartup' file into a new file '/etc/vnc/xstartup.custom'
In the new '/etc/vnc/xstartup.custom' file, find the line "xsetroot -solid gray", and edit it to read:

Code: Select all

xsetroot -solid gray -cursor_name left_ptr
and reboot.
The next time you run the 'vncserver' command on the Pi it should output a "normal" mouse pointer.

Hope this helps,
Dave.

Sir FICO
Posts: 31
Joined: Sat Nov 07, 2015 11:34 pm

Re: VNC black X cursor

Sun Sep 24, 2017 11:44 am

dgordon42 - Dave - that worked. I spent some hours searching, but of course came up with a lot of old posts non of which worked so you had evidently been digging in a more productive place than me ;) . Its seem a bit weird that the vnc startup would find a file with a modified file name, but maybe it lookes for the particular file name (i.e. xstartup.customize) that you suggested. Oh well, this tip has found its way into my crib sheet oh how I should modify any future image downloads. (though by then maybe the vnc startup stuff may get changed again :roll: )

Again, many thanks for pointing out the way to eliminate the horrible black cross. I give you some little xxxx (kisses) for your kind assistance.

wildestpixel
Posts: 24
Joined: Sun May 26, 2019 7:45 pm

Re: VNC black X cursor

Sun May 26, 2019 7:49 pm

Just looking through this as I’ve just got this to fix a black cross situation (!!) on a virtual vnc instance of Stretch.

Make sure you make the .custom file executable :

Code: Select all

sudo chmod ugo+x /etc/vnc/xstartup.custom
To infinity and the pond

Pi4B 4GB heading up the small armada

Return to “Troubleshooting”