Problem:
I want to use the VM to run the edge browser but wanted to stream the display on my mac machine. This way I will be using the mac for viewing purposes only.
So, for that I had to install X11 server (XQuartz) on mac.
On remote machine I was running ubuntu. So insalled x11-apps
apt install x11-apps
Make sure that X11 forwarding is enabled on remote machine
cat /etc/ssh/sshd_config | grep -i X11Forwarding
It should display

If not then edit the config file and uncomment or add the above line.
Start the XQuartz locally.
Connect to remote server using ssh using terminal
ssh -v -X -C root@myip
Use the key or password to authenticate.
Install helper libs:
sudo apt install software-properties-common apt-transport-https curl ca-certificates -y
Add GPG key
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
Using the above command may give you warning for apt-key deprecated. In that case you can use keyrings. Search the net 🙂
Add Repo
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
Update package list
sudo apt update
Install the edge
sudo apt install microsoft-edge-stable
Check version
microsoft-edge --version
Launch
export DISPLAY=:10.0 && microsoft-edge --no-sandbox
The below command should show the connected display to your remote computer. In the above command 10.0 is the connected display identifier.
echo $DISPLAY
For better performance, you can use x2go.
Install the server on remote machine. Install client on local machine. When configuring the session, select single application and add the command ‘microsoft-edge –no-sandbox’
Cheers and Peace out!!!