Help with a headless ubuntu 18.04 server so it runs a gui desktop (with access to the GPU

I was referred here by a friend of mine saying that you guys MIGHT be able to help me.

I’m having some very frustrating problems with a remote headless server running ubuntu.

I ordered a Headless ubuntu server in a data center in France to run OBS on so it can stream to youtube for me. I have a small stream about an AI learning to play mario games in real time. Problem is I can’t get it to work consistently. It runs until I reboot and then I can’t log in using xrdp anymore.

So let me start this by saying that VNC works perfectly and every time…however it doesn’t have access to the GPU so I can’t stream from it.
The alternative is running a desktop on a virtual monitor and then logging in via xrdp so I tried that.
I got some positive results early on with full blown desktops running everything and got everything working but now…for some reason nothing works anymore. It seems the virtual monitor I set up using nvidia-xconfig is dead and I can’t get it to work anymore.

Is there anyone who can help me fix this problem?

full details and logs can be found here: https://askubuntu.com/questions/1119542/headless-ubuntu-server-with-desktop-gui-with-working-gpu

I suspect that xrdp like the M$ version creates a virtual “gpu” adapter where it tries to tunnel it’s graphics from.
Which would explain why vnc, which just captures the desktop, and forwards it, works.
If i were you id stick to SSH x forwarding, you can SSH -X(notice capital X), where you can forward your gui, albeit if your working desktop is windows you’d need to install a xserver like xming, or something to that affect, there are a few of them.

It’s fairly simple just ssh -X “some ip addr/URL”
log in.
start your program/browser/what ever.
This will tunnel the gui to your current desktop, and is a godly feature of ssh.

Afaik ssh doesn’t actually forward X, it only tunnels a snapshot image of the remote session at a constant rate, meaning if the server made use of accelerated graphics, the client would still see as if no acceleration was happening.
So better stick to vnc featuring a decoder that supports it.

EDIT: Wait wait wait, I didn’t really concentrate.
Are you trying to just be able to play youtube on the remote server and forward it? If so then sure for that you could just forward X through ssh, just make sure that

ForwardX11 no

Is set to ‘yes’ on the server’s /etc/ssh/ssh_config, and then you should be able to just

ssh -X yourserver

Altho I dunno if it’s good practice to forward X through ssh, maybe you’d wanna run the ssh session in a nested window.
It won’t forward audio tho. If you’d want that you need to take some extra steps.

EDIT2: ‘paprefs’ for the audio, had to reminisce from this post

no, I am trying to run OBS so I can stream TO youtube. I have an AI that is learning to play mario games that is about to finish SMB (both normal mode as well as hard mode) and is about to move on to Lost Levels and I want to move the emulator and OBS it to a remote server. I already got it to work once but it simply stopped working and I think it is because I either don’t have an EDID file for my non-existent monitor so Xorg doesn’t emulate a fake monitor anymore or something else in my config broke. probably something with my nvidia setup.

Yeah, I know. I use Xming for work but once I exit whatever I’ve forwarded it stops running on that server and when you try to run a 24/7 stream that is a bad thing