booting to terminal with option to start ubuntu desktop

HI All

I’ve installed ubuntu on my BBB – it works fine.

I then installed the desktop, knowing that it would be a bit resource heavy.
It will be handy when I need to do all the development on the BBB – without being able to connect
it to my work computer (draconian security restrictions).

Now, I would like to set it up so that it boots to a simple text console, and only boots to the desktop when

This is pretty simple under PC ubuntu – you just modify grubs, and use startx when the desktop is required.

How can this be configured on the BBB?

Thanks for your help, it is greatly appreciated!!!

Kind regards