Black Screen and X Display Error When Switching from Game Mode to Desktop Mode

Hello,

For the past few days, when I switch from game mode to desktop mode, I get a black screen for about a minute, and then the desktop launches and shows this error:


Check your DISPLAY environment variable and make sure that you have enabled X.

If you are running remotely, make sure that you have a remote connection which will allow an X connection.

For more information visit Steam Support :: Linux Steam client unable to open a connection to X


Can anyone help me resolve this issue, please?