Score:0

I changed some files and cannot use GUI in ubuntu 20.04

kr flag

I was trying to restore previous versions of the files and this is what I did from root: cp -r /snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu /usr/lib

From that moment I cannot use the GUI. I can only login to the computer through the terminal (for example tty2). Please is there any way to repair the GUI?

guiverc avatar
cn flag
You've not provided clear details as to what you actually did; mentioning only a folder (which may have no impact if it contained nothing, or files that weren't like names to existing files). In the title you mentioned deleting some files, but your question makes no mention of any deletions. Your question is unclear.
shmu avatar
sr flag
It sounds to me like you not only copied it, but also moved it. Try moving it back. That should fix things. If you simply copied it, without removing it from its original location, or deleting files in the new location, then it should not cause issues in the new location.
Roberto avatar
kr flag
I was trying to restore previous versions of the files and this is what I did from root: cp -r /snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu /usr/lib
Score:1
zw flag

To reinstall the libraries in /usr/lib you have to connect the problematic machine to network and then execute below commands from text TTY:

sudo apt-get update
sudo apt-get install --reinstall $(dpkg -S /usr/lib/ | sed 's/,//g' | sed 's|: /usr/lib||')

and

cd /snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu
sudo apt-get install --reinstall $(dpkg -S $(ls -1 *.so*) | awk -F: '{print $1}' | sort -u)
Roberto avatar
kr flag
Thank you. Your answer was very useful. I tried it, but in my case I got some error messages regarding "unmet dependencies" and "dpkg -query no path found matching pattern". I think it is because before I had done some further changes copying files from one place to the other, and installing packages for apt of different versions that did not match. Finally I have reinstalled Ubuntu and it is working well. I will be more careful next time. Thank you for your help.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.