I have a 5K iMac and a Mac Pro, and want to use the 5K iMac as a remote desktop, how do I go about doing this?

I have a 5K iMac and a Mac Pro, and want to use the 5K iMac as a remote desktop.

It's easy to use vnc:// remote desktop protocol to allow the iMac to act as a remote desktop for the Mac Pro. But I still need to figure out how to set the Mac Pro to 5K display resolution... Does anyone know how this is done?

Original thread: https://forums.imore.com/threads/i-have-a-5k-imac-and-a-mac-pro-and-want-to-use-the-5k-imac-as-a-remote-desktop-how-do-i-go-about-doing-this.308499/