F5F Stay Refreshed Software Operating Systems I removed some of your home folders by accident, which is why XDG-USER-DIRs is behaving strangely.

I removed some of your home folders by accident, which is why XDG-USER-DIRs is behaving strangely.

I removed some of your home folders by accident, which is why XDG-USER-DIRs is behaving strangely.

S
Serpenh33
Member
208
05-17-2016, 06:06 AM
#1
I attempted to remove unnecessary folders from my home directory and managed to delete the Documents through Videos section in /home/user. I didn’t clear the entire $HOME folder, just the XDG subdirectories. After recreating them, I ran xdg-user-dirs-update --force but it didn’t assign them properly, leaving them blank. When I rebooted, Firefox reported it lacked a profile directory. I copied over all desired files, accessed root, and removed my old account (including rm -R /home/user), then set up a new account. This is where things got confusing—it created a fresh home but without XDG subfolders. Instead, there’s a $HOME folder containing .config and .cache, plus another $HOME inside it with its own .config and .cache. I checked the xdg config file, reinstalled Firefox, echoed $HOME and $XDG_VARS, and verified all environment files were clean. I deleted user_dirs.dir multiple times, but each time it regenerated with confusing variables. I reinstalled xdg-user-dirs over itself without success. I haven’t tried the full “nuke” option to force delete xdg-user-dirs and reinstall, fearing it might destroy my entire desktop environment. After extensive searching, I’m still stuck and can’t locate a clear way to reset xdg-user-dirs back to defaults. Any suggestions would be appreciated?
S
Serpenh33
05-17-2016, 06:06 AM #1

I attempted to remove unnecessary folders from my home directory and managed to delete the Documents through Videos section in /home/user. I didn’t clear the entire $HOME folder, just the XDG subdirectories. After recreating them, I ran xdg-user-dirs-update --force but it didn’t assign them properly, leaving them blank. When I rebooted, Firefox reported it lacked a profile directory. I copied over all desired files, accessed root, and removed my old account (including rm -R /home/user), then set up a new account. This is where things got confusing—it created a fresh home but without XDG subfolders. Instead, there’s a $HOME folder containing .config and .cache, plus another $HOME inside it with its own .config and .cache. I checked the xdg config file, reinstalled Firefox, echoed $HOME and $XDG_VARS, and verified all environment files were clean. I deleted user_dirs.dir multiple times, but each time it regenerated with confusing variables. I reinstalled xdg-user-dirs over itself without success. I haven’t tried the full “nuke” option to force delete xdg-user-dirs and reinstall, fearing it might destroy my entire desktop environment. After extensive searching, I’m still stuck and can’t locate a clear way to reset xdg-user-dirs back to defaults. Any suggestions would be appreciated?

S
SideburnsGuy
Junior Member
3
05-17-2016, 11:43 AM
#2
I can clarify this for you. Here’s a summary of the steps involved:

Commands used to set up the new account:
- Removed existing user directories and created new ones with specific defaults.
- Ensured the necessary directories exist in your $HOME folder.
- Rebooted the system to apply changes.

Regarding reboots: Yes, I’ve gone through a reboot since recreating the account.
Environment variables might need adjusting after a reboot for the XDG update service to function properly.
S
SideburnsGuy
05-17-2016, 11:43 AM #2

I can clarify this for you. Here’s a summary of the steps involved:

Commands used to set up the new account:
- Removed existing user directories and created new ones with specific defaults.
- Ensured the necessary directories exist in your $HOME folder.
- Rebooted the system to apply changes.

Regarding reboots: Yes, I’ve gone through a reboot since recreating the account.
Environment variables might need adjusting after a reboot for the XDG update service to function properly.

K
Kylee54321
Junior Member
6
05-18-2016, 04:49 AM
#3
I created this homedir/ directory structure with nested folders and files. I repeated it three times. After restarting, the variables were overwritten in the user_dirs file. Even after deleting all personal files from the root, the issue persists across new accounts. It seems a global environment variable is interfering.
K
Kylee54321
05-18-2016, 04:49 AM #3

I created this homedir/ directory structure with nested folders and files. I repeated it three times. After restarting, the variables were overwritten in the user_dirs file. Even after deleting all personal files from the root, the issue persists across new accounts. It seems a global environment variable is interfering.

A
ADIR_4444
Senior Member
417
06-05-2016, 10:12 PM
#4
It looks unusual. It might be due to nested environment variables. Try running printenv as root to check for any anomalies.
A
ADIR_4444
06-05-2016, 10:12 PM #4

It looks unusual. It might be due to nested environment variables. Try running printenv as root to check for any anomalies.

M
Magic_Wolf_
Senior Member
530
06-20-2016, 07:00 AM
#5
I resolved the issue by using the semi-nuclear method. Logged in as root, removed unwanted files, then reinstalled necessary packages. Rebooted the system. Xdg was able to set up everything in /root with default configurations. After that, I created my account normally and everything worked fine. Also, I executed the xdg update command, which likely fixed problems in the /root folder. It gave me the opportunity to set up a solid skeleton structure, including many aliases from GitHub, and configured the useradd hook to always use the skeleton when creating new users. Every cloud.
M
Magic_Wolf_
06-20-2016, 07:00 AM #5

I resolved the issue by using the semi-nuclear method. Logged in as root, removed unwanted files, then reinstalled necessary packages. Rebooted the system. Xdg was able to set up everything in /root with default configurations. After that, I created my account normally and everything worked fine. Also, I executed the xdg update command, which likely fixed problems in the /root folder. It gave me the opportunity to set up a solid skeleton structure, including many aliases from GitHub, and configured the useradd hook to always use the skeleton when creating new users. Every cloud.