Sorry, I had to run earlier, and submitted a response before ever finishing a sentence. So, I’m just passing through, and thought I might provide some potential insight. From my super quick scan of your logs, it appears the issue is that A) even though you’re starting from VT(n), by not explicitly telling xinit (startx is just a wrapper that dumbs down xinit… to actually start a new X on VT4 using DISPLAY:1, this is because rather than acting on VT4, startx if configured to default to :0 on VT7
What you want is essentially a single head, single seat, multiscreen xorg setup. It shouldn’t take much more than modifying the commands properly, but if you want to automate this, I would definitely create an additional config file for your second X server.
FYI: In case any of you aren’t aware. The display number is synonymous with the Xorg server number, so DISPLAY=:0 on vt7 is X:0, and has associated Xorg.0.log (and potentially Xorg.0.conf), and your second X server, on vt4 (or one of your choice) will be DISPLAY=:1
So, I boot up, systemd obnoxiously sets up everything fine and dandy, and I get my login screen (I don’t use a display manager, but lightdm, and sddm can both handle more complexity than a single X on vt7, xorg was designed as multi-user from the start! Just a matter of fighting their configs)
I’m logged in, and reach my login shell. From there, I start my first X server with a simple “xinit” my ~/.initrc runs, and I get a minimal set-up, and a fancy tmuxed to hell xterm! This is where I start my second screen, and if it doesn’t work as intended, all my shell’s die!!! Muhahah.
from my vt7, X=:0, I run “xinit /usr/bin/xterm – :1 vt4”
take note of the double -hyphens-, they separate your desired programs to run from server configuration, you simply need to declare an unused DISPLAY=:(n) and choose your VT(n)
The reason I run this from within a terminal on my first DISPLAY=:0? No need to hop over to the other VT first, it will open it for you if no errors drop, and by logging out, and exiting the VT7 xterm session, both sessions end… aaaaand it ensure’s both persist between changes, since killing the first would kill my second :P.
I definitely suggest you use init over startx. I’m unsure why, but I’ve always had to append the startx command with sudo when changing VTs like this, which drops you into a root session, not what I want!
“sudo startx xterm – :6.0 vt3”
I’m assuming I could add my user to a group with access privileges, I just can’t be bothered with xinit works the same.
If you want to use this regularly, can prepare an alternative xorg configuration file for xinit to set up your second screen.
“xinit /usr/bin/xterm – :1 vt4 --config /path/to/configfile.conf”
And if you don;t want to use the same user for both logins, you can make changes to the xinit commands, or to the config files, accordingly.
Let me know if this solves your issue. If not, maybe I misunderstand your use-case, this works for me fine!
There’s some crazy things you can do with X server, if you’re willing to beat it into submission, check out xorg.conf, multiseat, multihead, etc. Those are different use-cases, (multiseat = multiple users, using the same PC at the same time, separate screens and kb/mouse, multihead is single seated, but with many screens under the same Xserver, so the result of xrandr and whatnot), if you require any more fine tuning than above, these may not be the same thing you want, but if you examine the configurations, you’ll see that they adapt to your use easily.