ui: move some initialization out of vnc_init_state