change-gdm-background
change-gdm-background copied to clipboard
"Oh no! Something went wrong"
So actually I came from Ubuntu 21.04 and upgraded to 21.10. I got a strange issue after running this script here but I forgot the error message. However, after rebooting I got: "Oh no! Something went wrong"
It took me some hours to fix it and I was close to reinstall my whole system.
How to fix it?
In the end it is all about gnome-shell-theme.gresource
e.g. under /usr/share/gnome-shell/theme/Yaru
.
Unfortunately I could not recover the backup (gnome-shell-theme.gresource~
) beause it was actually from 21.04 that is incompatible with 21.10. So I needed a fresh gnome-shell-theme.gresource
from Ubuntu 21.10.
- Create a bootable Ubuntu live USB stick and boot into it and use "Try ubuntu" (if your real system is 21.10 then use 21.10 for the USB stick as well)
- Encrypt/mount (depends on what you have) your SSD/HDD
- Go into the right folder within your SSD/HDD
cd /mount/yourSSDHDD.../usr/share/gnome-shell/theme/Yaru
- Copy the fresh
gnome-shell-theme.gresource
:cp /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource ./
-
sudo reboot
and unplug your USB stick when it asks for.
@thiggy01 its up to you to add this worst case recovery in your README.md You can also close this issue. Maybe it just helps someone and saves some time.
The problem must be the script using the old backup. I'll add some logic to check the os version & gresource content to make sure it have the right backup version. Aside from that, how did you get into the "Oh no!"? Did you run the script after the upgrade or it just show up after the upgrade?
The error is not from the script. Its after rebooting the system. Here you can find a picture how it looks like: https://357558-1266171-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2020/05/Kali-Linux_Something-has-gone-wrong.png
You reboot after WHAT? The Upgrade or Running the script?
P/s: I already know how the error looks like while upgrade the script to compatiple with impish. P/s 2: My theory about the backup is right. Confirmed after try upgrade the ubuntu 20.04.3 to 21.10.
Oh sorry. I thought it was clear though my initial post.
- use Ubuntu 21.04
- run change-gdm-background script (here it creates the backup
gnome-shell-theme.gresource~
) - upgrade to Ubuntu 21.10
- (though upgrade, changes in
gnome-shell-theme.gresource
are reverted) - run change-gdm-background script (I guess it does not create backup file
gnome-shell-theme.gresource~
because it already exist from 21.04) ==> some error, that it cannot find the file unter /tmp/.... (but I dont remember anymore) - reboot
- error: "Oh no! Something went wrong"
- even restoring (
mv gnome-shell-theme.gresource~ gnome-shell-theme.gresource
) does not fix it becausegnome-shell-theme.gresource~
was created in Ubuntu 21.04 and is not compatible with Ubuntu 21.10.
I am not sure whether there is a good way to cover this situation within the script. Because it makes sense not doing a fresh backup everytime (let's assume the script already broke gnome-shell-theme.gresource
and then it would backup a broken file...). Actually it should only do a fresh backup, if a new Ubuntu dist-upgrade (e.g. 21.04->21.10) was done AND gnome-shell-theme.gresource
was not touched yet (by the script) ==> in other words: do a backup from a fresh gnome-shell-theme.gresource
.
I saw your hashtable approach. It assumes the checksum of gnome-shell-theme.gresource
stays equal in each ubuntu version. It may not cover 21.10.1 or 22.04.
I guess its just not a problem that can be solved completely dynamic. That's why I just vote to include a short manual how to recover it in worst case scenario via linux-live-usb-stick.
Maybe we write the release number to a file in /etc and check for it?
@teplydat @duckimann I'm going to try to simulate this error in a virtual machine before coming with any solution.
I have reverted support for impish until I resolve this issue.
So actually I came from Ubuntu 21.04 and upgraded to 21.10. I got a strange issue after running this script here but I forgot the error message. However, after rebooting I got: "Oh no! Something went wrong"
It took me some hours to fix it and I was close to reinstall my whole system.
How to fix it? In the end it is all about
gnome-shell-theme.gresource
e.g. under/usr/share/gnome-shell/theme/Yaru
. Unfortunately I could not recover the backup (gnome-shell-theme.gresource~
) beause it was actually from 21.04 that is incompatible with 21.10. So I needed a freshgnome-shell-theme.gresource
from Ubuntu 21.10.
- Create a bootable Ubuntu live USB stick and boot into it and use "Try ubuntu" (if your real system is 21.10 then use 21.10 for the USB stick as well)
- Encrypt/mount (depends on what you have) your SSD/HDD
- Go into the right folder within your SSD/HDD
cd /mount/yourSSDHDD.../usr/share/gnome-shell/theme/Yaru
- Copy the fresh
gnome-shell-theme.gresource
:cp /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource ./
sudo reboot
and unplug your USB stick when it asks for.@thiggy01 its up to you to add this worst case recovery in your README.md You can also close this issue. Maybe it just helps someone and saves some time.
@teplydat Thank you so so much for opening this issue and posting the steps you followed to fix this issue. I was experiencing the same problem after upgrading to Pop_OS 21.10. But I was saved by following your instructions. :tada:
The only difference for me was that my gnome-shell-theme.gresource
file was located at /usr/share/gnome-shell/theme/Pop/gnome-shell-theme.gresource
.
@teplydat Thanks a lot. It worked for me. But i ran the script after upgrading to pop 21.10. I expected the script to create a backup (filename ending with ~ ). No idea why restoring this didnt work. May be the script failed even before it can create the backup.
@teplydat Thank you so much. I am glad that I landed up here. I was on the verge of reinstalling everything. In my case, my build was Ubuntu 22.04 on which I encountered this error.
I was not using this script or any other script for that matter, rather I was tweaking the Yaru-dark/gnome-shell.css
. And after changing that css
, I restarted my system, I got that error.
As per your suggestion, I used a bootable USB which had Ubuntu 21.04 and it worked on my 22.04 as well.
I "tried out" the 21.04 and went into the /media
folder to access my SSD where I had my original 22.04 setup. From there, fired up a terminal, undid the changes I had done in gnome-shell.css (had to use sudo
), and restarted my PC. It worked!
Thanks a ton 😇🙏