I've looked through various answers to this, but none has solved my problem. Here are the specifics:
I ran Ubuntu Tweak Janitor to clean up some old kernels (I still left some) as well as caches and old configuration files (all under the System portion of the Janitor section). I also clean-out some program cache stuff (also under Janitor). Upon reboot, I got a surprise:
I only boot to the command line and can login via command line
At the login prompt I get
iptables-restore: line 59 failed Problem running '/lib/ufw/user.rules'
I also get messages every few seconds with a number sequence one states: "Asking for cache data failed" and the other states "Assuming drive cache: write through"
Once hitting Enter, I can log-in but remain at the command prompt.
At the prompt, I've tried:
Ctrl-Alt-F7 (seems to do something then just stops - usually at "checking battery state")
sudo apt-get install ubuntu-desktop xorg build-essential: I get a message that nothing installed as the most current version is already installed.
X: cannot stat /etc/X11/X (No such file or directory), aborting.
tried starting with other kernels (same result)
Tried part of suggestion here: "/etc/X11/X not executable" error when startx - When running the
sudo apt-get update && apt-get upgradeI got the following:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permissioin denied) E: Unable to lock the adminsitration directory (/var/lib/dpkg/), are you root?
I then tried the
sudo apt-get installs --reinstall xserver-xorg - made no difference. I didn't try the last command as I'm not sure it applies to my system and didn't want to make things worse (let me know if is something I should do).
Please help me fix whatever messed up so I can get my GUI back. I'm betting it's a simple fix but I can't figure it out!