Empty Home Directory

I just fixed an issue with a login loop, using this solution. So now I can log into my account again, but the home directory looks empty. I can see my old folders (Documents, Pictures, PycharmProjects etc) when I do cd /home/tmp/ && ls, but the folders don't appear graphically in my file system nor in /home/ when I try to list them. I tried moving them from tmp to home and I tried copying, but they remain invisible. How do I get the normal filesystem back? I'd rather not fix this by trial and error, that's why I ask it here.

I'm using Ubuntu 18.04 with a 5.3.0-28-generic kernel on a Dell Vostro 5590 laptop (only a few months old). It's not dual booted, I removed Windows.

Cheers!

3

1 Answer

gedit ~/.config/user-dirs.dirs

It should look like this:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Logout and log in again. They should become visible. But make sure these folders exist in your ~/ folder. That is:

$ ls ~/

Desktop  Downloads  Documents  Music  Public  Pictures  Videos    Templates

If you do not see these folders in your user's directory, then

  • create them manually
  • edit user-dirs.dirs file
  • copy files cp -fr /home/tmp/Documents/* /home/youruser/Documents/
  • Change ownership if required: chown -R /home/youruser/Documents
  • logout/login and check if Documents folder appeared.
  • repeat for the rest folders

Reference

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest