I've managed to select an incorrect Video resolution - can't get a display

Going into Safemode dosen't allow me to set the correct resolution for
non-safemode login
well I don't know the commands to reconfig

Can connect with VNC but again can't change video settings

I suppose I need to run some command line in safemode to reset the xwindows

Any ideas??