Software & AppsOperating SystemLinux

How To Change Default User Folders Path in Gnome 3?

Ubuntu 12

In this article, we will explore the process of changing the default user folders path in Gnome 3. This can be helpful if you want to organize your files differently or if you want to store them in a separate disk for better management.

Quick Answer

To change the default user folders path in Gnome 3, you need to edit the user-dirs.dirs file located in the .config directory in your home folder. Simply open the file in a text editor, change the paths as desired, and save the file. Then, log out and log back in to apply the changes.

Understanding User Folders in Gnome 3

In Gnome 3, each user has a set of default folders such as Documents, Music, Pictures, and Videos. These folders are located in the user’s home directory and are used by various applications to store and retrieve files. However, you may want to change the default location of these folders for various reasons. For instance, you may want to store your videos in a separate disk to save space on your main disk.

Changing the Default User Folders Path

To change the default user folders path, you need to edit the user-dirs.dirs file located in the .config directory in your home folder. This file contains the paths to the default user folders. You can open this file in a text editor and change the paths as per your preference.

Here are the steps to do this:

  1. Open a Terminal: Press Ctrl+Alt+T to open a terminal.
  2. Open the user-dirs.dirs File: Type the command gedit ~/.config/user-dirs.dirs and press Enter. This will open the user-dirs.dirs file in the Gedit text editor. In this command, gedit is the text editor, ~ represents the home directory, .config is the directory that contains configuration files, and user-dirs.dirs is the file that we want to edit.
  3. Edit the Paths: In the user-dirs.dirs file, each line represents a user folder definition. For example, the line XDG_VIDEOS_DIR="$HOME/Videos" represents the Videos folder. You can change the path in the quotes to your desired location. For example, you can change it to XDG_VIDEOS_DIR="/media/share/Video" to store your videos in the /media/share/Video directory.
  4. Save and Close the File: After making the changes, click on the Save button or press Ctrl+S to save the file. Then, close the text editor.
  5. Apply the Changes: To apply the changes, you need to log out of your Ubuntu session and log back in.

Using the Command Line to Change the Paths

If you prefer using the command line, you can use the xdg-user-dirs-update command to change the paths. Here is how you can do this:

  1. Open a Terminal: Press Ctrl+Alt+T to open a terminal.
  2. Change the Path: Type the command xdg-user-dirs-update --set VIDEOS "/media/share/Video" and press Enter. This will set the path for the Videos folder to /media/share/Video. In this command, xdg-user-dirs-update is the command to update the user directories, --set is the option to set a new path, VIDEOS is the folder that we want to change, and "/media/share/Video" is the new path.
  3. Apply the Changes: To apply the changes, you need to log out of your Ubuntu session and log back in.

Considerations

Please note that if you delete the default folders (e.g., ~/Documents), the tweaked user-dirs.dirs file may still be overwritten. Additionally, if the external disk is unplugged or restarted, the folders may disappear from the list. You can refer to the Ubuntu documentation for more information on solving these issues.

Conclusion

Changing the default user folders path in Gnome 3 can be a great way to organize your files and manage your disk space. By following the steps outlined in this article, you can easily customize the paths to your user folders. Remember to take care when editing configuration files and always make sure to back up your data before making any changes.

What is Gnome 3?

Gnome 3 is a desktop environment used in many Linux distributions. It provides a user-friendly interface and various features for customizing the desktop environment.

Why would I want to change the default user folders path?

There are several reasons why you might want to change the default user folders path. For example, you may want to store your files on a separate disk for better organization or to save space on your main disk.

Can I change the paths for all user folders?

Yes, you can change the paths for all user folders. The user-dirs.dirs file contains definitions for each user folder, and you can edit the paths for all folders in this file.

Can I use a different text editor instead of Gedit?

Yes, you can use a different text editor if you prefer. Simply replace gedit with the command for your preferred text editor when opening the user-dirs.dirs file.

Do I need to restart my computer after changing the default user folders path?

No, you don’t need to restart your computer. Simply logging out of your Ubuntu session and logging back in will apply the changes.

Will my changes to the default user folders path persist after system updates?

Generally, your changes should persist after system updates. However, it’s always a good idea to double-check the user-dirs.dirs file after an update to ensure your changes have not been overwritten.

Can I revert back to the default user folders path?

Yes, you can revert back to the default user folders path by restoring the original user-dirs.dirs file or by removing the modified file. Logging out and logging back in will apply the changes.

Leave a Comment

Your email address will not be published. Required fields are marked *