So I've recently started using Ubuntu on WSL2, and I'm trying to use X2Go as my X window system to run GUI apps. I start up the Ubuntu WSL, and run the SSH daemon. Then, I use the x2go client on Windows to connect to the X2Go server running on the Ubuntu WSL, and it all works fine.
But I want to normally use the Windows Terminal for running BASH, and run the GUI applications in the X2Go client. For this, the $DISPLAY environment variable needs to be set.
In this case, the value for the environment variable would be DISPLAY=:60.0 (where 60 is the display number in the screenshot above and 0 indicates monitor 0). But, every time I restart the client session, I get a different display number (previous display number + 1), and the value of the environment variable needs to be changed again.
Is there any way I can make the display number consistent and set the DISPLAY environment variable in .bashrc so that I do not need to export it every time? I'm new to this, so let me know if something doesn't make sense or if there's an entirely different approach that's better for this.