Multiple x server gaming

so at the beginning of the year I was trying to get 2 separate x sessions running one with a normal desktop environment running on the primary monitor and another with a steam os session running on a tv. well, I got it working sort of. So now i have kde runing on my monitor and when i press ctl+alt+f2 It switches to my 4k tv which is running the steamos compositor and session. The only issue is i have to switch between them with ctl+alt+f2 and ctl+alt+f1 and i also haven’t figured out how to automate it on boot.

i just had to install the steamos compostor and in the tty i want steam in run DISPLAY=":1" and then xinit /usr/bin/steamos-session and it worked

my question is does anyone know how i can automate all of this on boot?