Only background and mouse pointer after login Ubuntu 18.04

Solution 1:

I finally found the root cause, an incorrect config in my .bashrc file. It is a long story. I write them below:

This Ubuntu is a VM in VMWare Windows 10. And simultaneously I am trying WSL GUI. In .bashrc of my WSL account, I added:

export DISPLAY=host_ip:0.0

With an X11 server (VcXsrv) on host, I can run GUI programs on WSL. After this success, I tried this on bash session to my VM Ubuntu in host SecureCRT, and it is also a success.

Then I wrongly added the same export DISPLAY=xxx:0.0 configuration in .bashrc of my VM Ubuntu account. On the new login after this, I cannot use the GUI of my VM Ubuntu and without knowing why. And I asked here.

It is a per-user-account problem. But it cannot be solved by deleting ~/.cache ~/.config ~/.local because the root cause is in .bashrc. I found the root cause by accident.

That is the full story. Sorry for the trouble. Thank you all!