helpThe GNU Bourne-Again SHell - Support: sr #108134, Use XDG dirs instead of $HOME


sr #108134: Use XDG dirs instead of $HOME

Submitted by:  Oliver Propst <oliverp>
Submitted on:  Sun 16 Sep 2012 11:11:47 AM UTC  
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat 05 Jan 2013 09:24:33 AM UTC, comment #2:

According to XDG Base directory specification,
user preferences should go into $XDG_CONFIG_HOME (which default to ~/.config)
and cached data should go to $XDG_CACHE_HOME (which default to ~/.cache).
More details at :

Full specification can be found at:

The XDG base directory specification have good de facto adoption.
It has been adopted by:
- GNOME ( )
- GTK+ ( )
- KDE ( )
- QT ( )
- XFCE ( in Files and Environment Variables )
- Razor-qt
- VLC ( )
- GStreamer ( )
- Chrome ( )
- many more upstream applications
- Ubuntu ( & )
- Debian ( )
- Red Hat
- Fedora
- Suse
- many more distributions

I think that bash should use same locations than the vast majority of Desktop environment and applications.

There are real advantages of following this specification :
- a lot less cluttered $HOME
- Make backups a lot more safer and easier.
Backuping your $XDG_DATA_HOME along with your files is enough
(or just excluding $XDG_CACHE_HOME)
- A lot easier to reset a default configuration if you want/need it (and
without any risk to loose informations). Even for the software itself
could choose to reset $XDG_CONFIG_HOME if needed.
- Avoid some strange bugs that happens because you had a old version of
some configuration file
- A lot more of flexibility and portability because no path are hardcoded.

Eric Heintzmann <eheintzmann>
Wed 21 Nov 2012 12:32:53 PM UTC, comment #1:
  • ping
FaisPas <faispasierch>
Sun 16 Sep 2012 11:11:47 AM UTC, original submission:

Bash stores ~/.bash_aliases , ~/.bash_history, ~/.bash_logout and ~/.bashrc in the home directory. It would be better to store these files according to the XDG Base Directory Specification.

Oliver Propst <oliverp>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by eheintzmann (Posted a comment)
  • -unavailable- added by faispasierch (Posted a comment)
  • -unavailable- added by oliverp (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup