Just for the sake of exemplification, let's assume that your username is abhishek and that your home folder is /home/abhishek, ok? Just change it for the correct info, at my examples below.
Open a shell terminal window and issue the command below, in order to check what's the parameter currently attributed to your
$HOME environment variable:
If the output is not
/home/abhishek, then run the command below in order to set the new value of $HOME:
...and then run:
...in order to make this change take effect.
Afterwards, run the
usermod command just to make sure that the Linux system "knows" that your home folder is in fact
/home/abhishek. Here's the full command:
sudo usermod --home /home/abhishek abhishek
Now... Do you have GNOME Edit (aka GEdit or
gedit) installed? If not, first install it:
sudo apt-get install gedit -y
...then use GEdit to take a look at your
...and fix everything. E.g.: the
XDG_DOWNLOAD_DIR attribute should look like
"$HOME/Downloads" is the correct parameter and the value of the variable
$HOME must be
/home/abhishek (your theoretical home folder).
After fixing the code, save the file and close/exit GEdit.
In case you're unable to use the GUI (graphical user interface) because your login / account isn't being identified anymore by the display manager, press Ctrl Alt F1 to switch to the TTYS1 (terminal 1) login prompt (it's in text mode), then log into your account (Linux shell) and use Nano to edit that file:
After you fix everything, use Ctrl O to save the changes and Ctrl X to exit Nano. If you don't have Nano installed, run
sudo apt-get install nano -y in order to install it and then use it to edit the file.
After saving the changes made to
user-dirs.dirs and closing/exiting GEdit/Nano, run this command in order to restart the operating system:
sudo telinit 6
If my answer didn't help you, take a look at this question and also this other one.