startx hot plugging monitor

I have Ubuntu Server 18.04. I installed Xorg, plugged in my monitor and started my app like this:

startx ./MyApplication

It runs perfectly, but if I unplug my monitor, run the command and then plug my monitor again, Xorg cannot detect the monitor.

Is there any solution for this? Can startx auto detect the monitor? If not, should I use something else, like Wayland?

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like