When I logged in to my computer (running 24.04), nothing worked: background disappeared, the panel was “stretched” so that clicking on an icon activated action for an icon bit to the side and there was no menu on the left. When I managed to open something, I would mostly get an empty frame. I could open a terminal (with Ctrl+Alt+t), but could not write in it (or could, but the letters appear perhaps a minute later)… It looks like the desktop/window manager is broken..
What works:
I can access tty sessions using Ctrl+Alt+Fn-keys and see that my files are in place.
I looked at all recently changed dot-files in my home directory, but did not find anything strange there
I can log in into the Guest account and everything seems OK
this suggests that the problem is with my user account, not the system as such(?)
The only unusual thing I had done prior to this was to log in into a Guest session (by mistake). But I might have changed something somewhere some time ago, because I usually just suspend the machine so it had been some time since last logout/restart…
What can I do to fix the account?
And if there isn’t a quick and safe solution, what can I do to be able to access my files? I need to work with my pictures this weekend. I was thinking about creating a new user and adding it to the group of my old user (since most files are accessible by user and group) - or is there a better way?
I'd definitely try makin a new user and see if the desktop session works. After that; you can think about how to get access to your existing users files.
If stephematician’s suggestion doesn’t work try recovery mode.
In Ubuntu's recovery mode, users are presented with several critical options to help troubleshoot and repair system issues. Here are the options you can typically find, listed in the order they appear:
Option
Description
resume
Exits recovery mode and attempts to boot Ubuntu normally.
clean
Removes files to free up disk space, which can be useful if your system is unable to boot due to low space.
dpkg
Repairs broken packages and dependencies.
fsck
Checks and repairs filesystem errors on your partitions.
network
Enables networking within recovery mode, allowing you to update or download necessary files.
root
Drops to a root shell prompt for command line access, allowing for manual troubleshooting and repairs.
archive
Manages old kernels and removes unnecessary ones to reclaim space.
grub
Reinstalls the bootloader (GRUB) to fix boot issues.
I would focus on clean, dpkg, fsck and maybe archive if you think the kernel might be corrupted, then reboot and sees what happened.
clean Removes files to free up disk space, which can be useful if your system is unable to boot due to low space. dpkg Repairs broken packages and dependencies. fsck Checks and repairs filesystem errors on your partitions. network Enables networking within recovery mode, allowing you to update or download necessary files. root Drops to a root shell prompt for command line access, allowing for manual troubleshooting and repairs. archive Manages old kernels and removes unnecessary ones to reclaim space.
grub Reinstalls the bootloader (GRUB) to fix boot issues.
These options allow users to address various system failures that can prevent the normal boot process. By choosing the relevant option, users can navigate through their issues systematically, whether it's freeing up disk space or fixing broken packages.
I don’t know your knowledge but I think if you know how to make your new user by the command line you can drop to the terminal and create the new user. I don’t have that ability but someone else here should.
Another option if you still have a USB with an OS written to it boot into that, put in another USB drive with enough space and copy your data to that and then reinstall.
I have done that myself. Just make sure the old user is deleted but the files are kept. Then create the same user with exactly the same user name, open two instances of Caja and drag them over. The owner should be the same user name so you shouldn’t have a problem with permissions if I remember correctly. Otherwise you will have to open Caja as root to drag the files over and change the permission on each file.
The bigger thing is do you have bookmarks, passwords, email addresses and all that kind of stuff backed up? Also don’t forget to give yourself sudo privileges. I also always keep a second user with sudo privileges just because I have had this happen to me more than once. Backing up the most important files to an external hard drive or USB drive first would also be wise. You never know what can go wrong and when it will go wrong.
You could try this (swapping contents of the "old" and "new" user home directories):
rename your old (previous) account home directory to a temporary name,
rename the new account home directory to the name of your proper ID,
rename the old account home directory to the name the "new user" was given,
perform a find on everything in the newly created home directory (where the good ID login is pointing to) and perform a sudo chown -R username:groupname .
move key hidden files and directories from the "old" directory (now under the new user name location) back to your proper HOME, such as
delete the "Standard" subdirectories from the "new" HOME directory (i.e. rm -rf Desktop Documents Downloads Music Pictures Public snap Templates Videos) before those get populated with anything new ... then move all non-hidden files and directories from the "old" directory (now under new name) to the "new" directory (now under the original user name), thereby restoring all "original" user-specific data/work files that are not related to the Destop Management setup for the account.
As for those other hidden directories that affect your "old" IDs customization, you have to merge those in carefully, so that you don't import the problematic (corrupt or malformed) files.
Sorry for the delay, had to do other stuff first. I decided to do it this way, ie:
delete the old user (michal)
rename the old user’s home to something else
create user michal with the same uid and gid as the old one
At this point, I would have to test if I can log in to that user or not (in case the problem was not located in the home-directory). If if worked, I could start copying files from the backed-up home directory.
I almost started it, but then I noticed that the old user has encrypted Private directory in my home, while the temporary user I am using now was created without. What do I need to do to ensure that the re-created user has a working encrypted Private directory as well?