I suspended network manager to test something and resumed it and now I can't boot into a desktop environment or use anything graphical. I can only use the tty. When I use startx, nothing happens. Ive been looking online for different solutions and a lot of answers said to try xhost +. But that didnt work either. It says
Code:

Code:
xhost: unable to open display ":0.0"
When I echo the display varible, it's empty, so I exported DISPLAY as 0.0 with xhost but it says
Code:
Code:
Invalid MIT-MAGIC-COOKIE-1 keyxhost: unable to open display ":0.0"
When I try to launch mate-session, it says
Code:

Code:
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: could not connect: connection refused
When I launch Plasma it says something similar but also says it can't start because Plasma's graphical platform plugin could be initialized. I don't know how to fix it.

I tried regenerating the .Xauthority file but I get an error when I do that too.
Code:
xauth generate :0 . trusted no protocool specified unable to open
I get an error for every single solution I try

Every time I reboot, there is no $DISPLAY variable set. When I echo $DISPLAY, I just get (''''). It's empty so I export :0.0 to display, but I still get an error that the display can't open.

Do I need to reinstall Ubuntu? Is it not repairable?