Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 16778 ideas, 103272 comments, 2165696 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #1210: Standardise the Configuration directories.

Written by Auzy the 29 Feb 08 at 10:05. Category: Others. Related project: Nothing/Others. Status: New
Rationale
User directories on ubuntu are easily a mess at the moment. They need more standardisation and more sense to remain clean. If you go to terminal/bash you may discover that your directory looks something like:


/home/auzy/Documents
/home/auzy/.Azureus (Hidden)
/home/auzy/.gnome2 (Hidden)
/home/auzy/Desktop
/home/auzy/.bashrc2 (Hidden)
/home/auzy/readme.rtf
/home/auzy/.Trash (Hidden)
/home/auzy/iffy.rtf
/home/auzy/delete me.rtf
/home/auzy/argggggg.c
/home/auzy/fgdhgfdhd.txt
/home/auzy/Music
/home/auzy/.ooffice (Hidden)
/home/auzy/friendsassignment.c
/home/auzy/friendsassignmentCopy.c
etc.


While you may note that anything with . is hidden normally, what if someone wants to delete the settings for a program? They need to manually unhide it, and sort through the dozens of directories in the home directory to find it. The problems with this is that:

a) Its messy, and certainly not a clean solution
b) Users cannot easily access their settings.
c) Everyones home directory is normally trashed with hundreds of other files, making it difficult to navigate.
d) Its not standardised.


A better way of organising the home directories would be something like:
/home/auzy/Documents
/home/auzy/Desktop
/home/auzy/readme.rtf
/home/auzy/iffy.rtf
/home/auzy/delete me.rtf
/home/auzy/argggggg.c
/home/auzy/fgdhgfdhd.txt
/home/auzy/Music
/home/auzy/friendsassignment.c
/home/auzy/friendsassignmentCopy.c
/home/auzy/Settings/
/home/auzy/Settings/org.Azureus.Azureus/*
/home/auzy/Settings/org.gnome.gnome2/*
/home/auzy/Settings/com.sun.ooffice/*
/home/auzy/Settings/org.bash.bash2/bashrc2
/home/auzy/Trash/*

The advantages? Simple

a) All user settings are now centralised in a single directory
b) Your user directory can be as messy as you want, and you will still be able to find your settings easily
c) Because settings are stored in reverse notation, you can easily find settings which all relate to the same company. Whilst at first this appears to make things harder, its not. Because it means that if you wish to change from KDE to gnome, you can now easily delete all com.kde.* settings, and they are gone.
d) No more searching for program preferences. You know exactly where your personal settings for a program are
e) No longer any need to hide them, because they are already cleaned up, and wont make the users directory appear messy.
f) Makes it easier to wipe the settings for specific programs, no need to unhide, and search everywhere, or go to faqs. You can easily guess now.
g) Finding something in your home directory is less painful with ls.
h) You can now use file hiding in your directory for useful purposes. Cant think of any though.


Unfortunately, it may require a few modifications to programs to support fully, so it would kind of be program, by program, trying to get the patches merged upstream, but if serious effort was put into it, it would benefit everyone.

Untested programs will still work, but put settings in the wrong spot. You can still create a symlink to those directories though in /settings easily with 1 line of code, so users can still access the programs configurations.
Tags: (none)

667
votes
up equal down
Solution #1: Auto-generated solution of idea #1210
Written by Auzy the 29 Feb 08 at 10:05.
Ubuntu Brainstorm was updated in January 2009. Since the idea #1210 was submitted before this update, its rationale and solution are not separated. Please vote accordingly, and if you have the necessary rights, please separate the rationale from the solution. Thanks!

Propose your solution

Attachments


Duplicates


Comments
howlingmadhowie wrote on the 29 Feb 08 at 10:19
having user local configurations in hidden files or hidden directories in $HOME has been a unix standard approach for more than 30 years now.

Brot wrote on the 29 Feb 08 at 10:22
there is already project which works on this problem
http://www.freedesktop.org/wiki/

If all programms will follow these guidelines the world would be perfect.
I think this is no Ubuntu problem! This is a software maintainer problem.

Ferk wrote on the 29 Feb 08 at 10:27
GNOME annoys me the most.. most of my hidden folders are from GNOME apps..

There is a standard in freedesktop, like Brot said that puts every configuration file in ~/.config/ ...some programs already do this (like the last version of Totem.. or XFCE apps)

I think following this standards should be encouraged.

Auzy wrote on the 29 Feb 08 at 11:05
Standards change, and this one can be slowly changed without breaking anything. Just beacuse its a standard doesn't make it any good.

Remember, Kernel 2.4 and Xfree86 used to be the standard, but standards change for the better

kenden wrote on the 29 Feb 08 at 11:16
To precise a bit the idea: encourage packagers/developers to make use of $XDG_CONFIG_HOME

http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html

"$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used."

Auzy wrote on the 29 Feb 08 at 11:33
I agree with kenden. Even if Ubuntu has a team helping submitting patches to projects which change their config's to use the env variable.

salec wrote on the 29 Feb 08 at 11:36
Perhaps offer a "show hidden files only" option in Nautilus/whichever file manager?

Effectively, it would be like having a separate "Settings" directory, only better, because it would work everywhere, not just in home directory

Auzy wrote on the 29 Feb 08 at 12:57
As Kenden said, there is a standard available already though, we should get people to follow that. Whilst a showing hidden files may be handy, its better to fix it fully

mmcmonster wrote on the 29 Feb 08 at 13:17
Also agree with kenden. There is a standard that isn't being followed. Encourage the package maintainers to follow the standard.

peterjs wrote on the 29 Feb 08 at 19:15
It's not broken don't fix it. There is already a settings directory, ~. Not only is there already a settings directory, with the exception of junk that's in .config, everything should be stored by program name. If it just had a more sensible name like .gnome-config we'd all be fine. The system works, all configuration files are in one place, hidden in the root of the users home directory. Moving and unhiding them won't improve anything, if anything it will lead to more clutter, and increase new user's likely hood of deleting things they shouldn't.

ebrahim wrote on the 29 Feb 08 at 19:48
Please stop using that nasty Java namespace convention!

guepe wrote on the 29 Feb 08 at 19:59
This "feature" is great.. but will change slowly because it is app-related. Thus it is irrelevant here, even if encouraging such behaviour is a good thing to me.

Eldmannen wrote on the 1 Mar 08 at 00:16
Great idea!

I agree!

mafitzpatrick wrote on the 1 Mar 08 at 10:32
peterjs: Not sure why you think the stuff i ~/.config is automatically junk? As mentioned above storing config files in ~/.config (using the $XDG_CONFIG_HOME env variable) is the correct way to program configuration files: the problem is the apps that dont do this, not the ones that do.

There is no logical reason for storing individual configuration files hidden in the home directory when you could roll them up under a single .config location. As individual files it is impossible to know what they are, similar files should be grouped.

Naming them all .-config is a cludge: if you need to add something to a bunch of files to identify them, they belong in a directory.

I suspect the problem with implementing this will be moving already existing config files.

+1 for the standard $XDG_CONFIG_HOME approach.

peterjs wrote on the 1 Mar 08 at 10:50
I did not realize there was a standard for ~/.config

The only thing I ever find in there is gconf and other stuff that is tightly related to gnome and assumed that it was supposed to be a gnome-config directory that was poorly labeled. Having everything under ~/.config/app name would be workable, just don't make if visible by default or users will delete it. Also how do thinks like .themes and .icons that aren't configuration but data figured in to this scheme?

Dolanor wrote on the 1 Mar 08 at 12:59
I think it is a very good idea, but it must be pushed a little bit more

I know the .config thing, but it should be
.config-hostname-distrib-version-number

something like that. With the lsb compliance, it should be easy to get those data.
And at boot, Ubuntu creates some .config links to the directory created before.

So that this home CAN BE shared between machines (hostnames), differents version of distrib (version), or differents install of same version of distrib (number), and between distribution (distrib)...

What do you think ?

Of course, every distrib with you share this home should use the same system (.config links created at boot time) and should have the LSB data to get those informations

Greyor wrote on the 2 Mar 08 at 10:37
Auzy, as much as I've appreciated your comments and ideas elsewhere, I think this is rather misguided. This has been a UNIX standard for 30 years, yes, and I don't see why it should change. The dotfile directories are rather clearly marked, and it's easy to unhide the folders if you want to view them in Nautilus.

I think your proposition would cause a lot of unnecessary clutter in the directory names. Part of the reason why I like *nix naming schemes is that they are short and succinct... true, things are not always immediately intuitive, but on the whole I've found things to be rather well-organised.

I'm sorry, but I'm going to have to give this a no.

mp3phish wrote on the 3 Mar 08 at 05:21
Greyor,

with all due respect, 30 years ago we didn't have a thousand desktop applications installed by default each installing their own . file into the home root.

There is a standard in place and it states to put application configuration files into the ~.config directory. If you want legacy apps to stay in the user home that is fine. But desktop applicaitons? Give me a break. There is no "UNIX Standard" for desktop applications that has existed for 30 years. You are the one that is misguided.

mathieu.convert wrote on the 3 Mar 08 at 10:18
Why not to think about the idea of gobolinux distribution ?

cmittle wrote on the 3 Mar 08 at 19:11
How about better organization of the things you put in your /home folder. I organized mine something like this;

/home/
.cory
..personal
...pictures
...documents
....computer
....car
....house
...music
...spreadsheets
...wiki
..professional
...work
...school

etc...

This is very easy to use, and now you're /home/username folder isn't cluttered.

Cory

Auzy wrote on the 4 Mar 08 at 06:51
It gets cluttered though because of scattered settings though mainly

tomtom_fr wrote on the 5 Mar 08 at 10:26
I agree also with kenden, it's a way to have a cleaner home directory.

Cyphase wrote on the 8 Mar 08 at 08:22
peterjs: "Also how do thinks like .themes and .icons that aren't configuration but data figured in to this scheme?"

Unless there is some other spec for these, I believe they would belong in ~/.local/share. Take a look at this for more information:

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

ka2 wrote on the 9 Mar 08 at 06:23
NO. Not an ubuntu problem. Many gome apps use gconf already.
And there already is a standard - "dot files".

andrewfenn wrote on the 12 Mar 08 at 11:51
Try it.. "ls" without quotes in your home directory. I get no .program config files or folders.

It's only when you type "ls -a" (-a Do not ignore entries starting with ".") that you get these folders.

Why not go ahead and call it "Documents and Settings" already. Linux is NOT Windows.

The fact that everyone voted this idea up just shows how crap Brainstorm is. Someone can LIE about how a feature works, suggest a solution where there is no problem and people vote it up!

Auzy wrote on the 14 Mar 08 at 14:17
Actually, I never once said the output was caused by ls. When I mentioned ls, I actually meant in reference to rearranging the names of setting directories so they were standardised (ie, com.X.X, not .gnome there, com.java.azureus there, etc, just a clean means of organisation), and I meant also just to seperate them out fully. You are right though, I maybe should have reclarified that.

All I want is all my settings in a seperate directory away from media files, with a more standardised way of naming them. you are right, ls -a and ls may from some peoples sense fix the problem, however, I'd like it so that its clean enough to unhide actually (so if a user has an issue with dodgy settings, its easier for them to find where they can delete them because they are all in one location, and cleanly named..

One issue we suffer is that config files can be stored in either the company name, or the product name. I just want a standard good enough, that when ubuntu is mainstream, its not just because its free, but because everything is as clean as it should be, and logical. Home directory should only be for user files. Settings should be in its own directory in the user directory. Because better organisation makes things better

Xan wrote on the 14 Mar 08 at 18:07
xfce (part of xubuntu) has it: all in ~/.config.

andrewfenn wrote on the 15 Mar 08 at 06:17
Yes you did, you said "If you go to bash/terminal..".

What command do you use to look at directories Auzy? oh yeah, "ls".

natureflow wrote on the 19 Mar 08 at 09:38
$XDG_CONFIG_HOME for all applications! :D

Rioting_Pacifist wrote on the 19 Mar 08 at 15:04
if its not broken dont fix it.
kde uses .kde
xfce uses .config
gnome probably uses something
3rd party apps use .3rd party

if youve every backed up programs you'll appreciate that unrelated programs can easily be backed up seperatly, but if programs are linked (as is the case with kde or gnome programs) then you have to understand the links to back it up.

if your in terminal finding stuff is so easy it doesnt matter anyway, if your in natilus then cant you sort alphabetically, or start typing the name of the file your looking for?

ls -A | grep serves me fine
or if its hidden in some dir
ls -AR | grep
will find it instantly.

if your browsing through natilus well you shouldnt be changing .files without help anyway.

txtfile wrote on the 20 Mar 08 at 00:26
what a silly idea

wolfwitch wrote on the 20 Mar 08 at 15:30
Already being worked on, and frankly- the Linux config files aren't any more confusing or difficult to deal with than the Windows registry.

loonyphoenix wrote on the 24 Mar 08 at 15:31
+1 for $XDG_CONFIG_HOME. I whole-heartedly agree. Except it's not exatcly an Ubuntu problem :)

DylanMcCall wrote on the 6 Apr 08 at 03:48
On the topic of standardized naming for config files, there is something I have been pondering:
It could be very benficial to use the .desktop entry standard for defining applications (in /usr/share/applications, if I recall correctly?) to also describe configuration systems. For example, a program could describe where its configuration files are located - or how to find them - via a simple Config key in that file.

It could be an interesting way to keep the miriad of config files well organized based on the applications they belong to, as well as keeping the standards we have nice and cohesive.

wit3k wrote on the 6 Apr 08 at 15:02
""$HOME has been a unix standard approach for more than 30 years now.""
OOXML is a "standard" too.

We cant resign from doing improvments just because something is standard.

Auzy wrote on the 7 Apr 08 at 01:27
No andrewfenn, I didn't say. I said if you go to terminal.. Would it have made any difference if I said use midnight commander or enable hidden files too?

wladston wrote on the 7 Apr 08 at 07:23
Amazing idea, ++1

eld1e6o wrote on the 7 Apr 08 at 07:44
It's a great Idea!


It is a great idea.
I was about to write that, and I always wonder because they do not

bochecha wrote on the 8 Apr 08 at 05:36
Great idea.

Just a few thoughts:
1. "not broken then don't fix". This kind of mentality only has one consequence: it prevents innovation. Do you think the Linux kernel is being worked on because it is broken and needs to be fixed? ;)

2. Those arguing that it has been a standard for more than 30 years (Windows has been a standard on the desktop for a long time too ;) clearly didn't read carefully the specification at FreeDesktop.org. Let me sum it up: it is about programs all using the same environment variable for configuration files. You don't like it being in ~/.config? Then simply go to /etc/skel and add the following line to the .bashrc (or .whatevershellyoureusingrc) file:
export XDG_CONFIG_HOME=$HOME

Kind of complicated isn't it? Oh sorry, you'll also have to do it for the root account (which might be the only one after a fresh install if you're so much into standards)

Anyway. This is a great idea, as standardization always is. Looking forward to have all my apps using $XDG_CONFIG_HOME...

denys wrote on the 13 Apr 08 at 10:10
This variable is empty on my Gutsy:

user@computer:~$ echo $HOME
/home/user
user@computer:~$ echo $XDG_CONFIG_HOME

user@computer:~$

Is this only on my computer or not?

wattazoum wrote on the 14 Apr 08 at 04:58
@denys:
No, it's not yours only. The standard says you must use XDG_CONFIG_HOME defaulting to ~/.config.
This means that XDG_CONFIG_HOME should be used to override the default but it might not be set so the files will be stored in the ~/.config dir

lsdark wrote on the 15 Apr 08 at 13:38
everybody here talking about what is standard, so i give you mine :
i wants all config to be fu*ked and move to my brain. This is the only clean way. I don't want them to be in my Home cause they are not mine (??)
I want to set XDG_HOME_CONFIG to /dev/null cause i found it better and other HAVE TO DO the same way as me cause I AM THE LAW and I decide FOR EVERYBODY what is the RIGHT WAY. And I don't care about the 30 years old roots geeks that were peaceful before the windows-users-i-want-linux-to-be-like-I-want invasion.

Those who don't want programs that puts .files in their directories should not use them and that's all. Or patch it themself to change the config dir and stop boring us with gnagnagna i don't like it ! That's the only linux standard : PATCH ME.

Ahh ca fait du bien..

PS : stop deciding what is a standard and what is not, bl**dy m*r*ns

lsdark wrote on the 15 Apr 08 at 13:44
oh yes and -1 just because of the stupid comments, even if it would be a good idea.

bochecha wrote on the 16 Apr 08 at 07:05
"PS : stop deciding what is a standard and what is not, bl**dy m*r*ns"
WE didn't do that.

However, FreeDesktop.org, which is a standardization organization for the Linux Desktop, decided that.

Sorry, but I'll still go with this as a standard.

elisee wrote on the 16 Apr 08 at 17:25
Use XDG_CONFIG_HOME FreeDesktop standard! :)

elisee wrote on the 16 Apr 08 at 17:33
This is also a duplicate of http://brainstorm.ubuntu.com/idea/6557/ which i voted +1 because it suggests the Right Thing To Do!

nitrofurano wrote on the 5 Sep 08 at 21:19
When i start using Linux 10 years ago i had this idea as well - in one hand, maybe you're taking as mistake considering your Home ('~/') directory as your documents folder, what can be considered a bit shocky from some bad habits when migrating.

Well, personally i used to have documents on another partition, which helps a lot on being better organized (at least it were for me), as i think and believe it's nothing recommended on having documents folder into your 'home' directory.

Overally, i used to see the the 'home' directory only for our Linux account preferences about operative system and applications, as well temporary files and desktop items, and stuff like installed typefaces ('~/.fonts' - fonts there can be considered installed, some people may not know...), wallpapers, file templates, nautilus scripts, .gnomecc colour schemes, etc.

Of course, some developers used to use '~/.config/' as the default folder for settings (like audacious and totem), and of course, would be interesting if more developers concerns on making '~' directory more organized, since people (like me) used to have thousands of applications installed, which may mean thousands of folders into '~' ...

Trinix wrote on the 12 Oct 08 at 17:28
Auzy is in the right here. If we really want to be clean and standardized, we should do it how OS X does it.

(There are hidden files in HardDrive/ but those are system required files and the user would never-ever have to touch them, see them, or interact with them in any way. It's also forbidden too.)

HardDrive/Applications/
- Applications which are accessible to all users. Restrictions on these global applications can be placed in the Accounts Preference Pane.

HardDrive/Library/
HardDrive/Library/Application Support/
HardDrive/Library/Audio/
HardDrive/Library/Caches/
HardDrive/Library/Desktop Pictures/
HardDrive/Library/Extensions/
HardDrive/Library/Filesystems/
HardDrive/Library/Frameworks/
HardDrive/Library/etc.../

HardDrive/System/
HardDrive/System/Library/CoreServices/
HardDrive/System/Library/Frameworks/
HardDrive/System/Library/OpenSSL/
HardDrive/System/Library/DTDs/
HardDrive/System/Library/etc.../


HardDrive/Users//Applications
- These are applications that only the particular user can access and see. Applications can be installed either here or in the HardDrive/Applications/ folder. In fact, a user can simple drag and drop applications between these to folders depending on whether or not they decide to change that. Power. Control. Flexibility.

HardDrive/Users//Desktop/
HardDrive/Users//Documents/
HardDrive/Users//Music/
HardDrive/Users//Pictures/
HardDrive/Users//Movies/
HardDrive/Users//Downloads/
HardDrive/Users//Library/
- This "Library" folder is user specific, unlike the HardDrive/Library folder.

HardDrive/Users//Library/Preferences/
HardDrive/Users//Library/Autosave Information/
HardDrive/Users//Library/Caches/
HardDrive/Users//Library/Cookies/
HardDrive/Users//Library/Logs/
HardDrive/Users//Library/Application Support/
HardDrive/Users//Library/etc.../

• If we followed the above structure, there would be a logical storage place for ***everything*** that could be quickly and easily found. No more hiding anything. Its clean and very well organized. By doing things in this way, it makes it easier to have applications more easily interoperate with each other along with sharing data.
• Proper permission settings can also be used to prevent users from accidentally deleting whole "Library" or "System" folders and makes navigation, especially in recovery operations, much more approachable. Yet another benefit to this structure.
• Manual de-installation of programs is fast and painless.

• There are easily dozens of reasons why it should be structured in this fashion ranging from developer to end-user benefits.

Trinix wrote on the 12 Oct 08 at 17:30
For some reason on the above, it took out "accounts" with < and > (probable due to formatting). Where you see " // " there should be the word user accounts between that.

Trinix wrote on the 12 Oct 08 at 17:45
• There is another point Auzy was trying to make in the way preference files are named by applications. Agree +2.

"Actually, I never once said the output was caused by ls. When I mentioned ls, I actually meant in reference to rearranging the names of setting directories so they were standardised (ie, com.X.X, not .gnome there, com.java.azureus there, etc, just a clean means of organisation), and I meant also just to seperate them out fully."
• Auzy was proposing a method similar to how OS X wants (but not requires) applications to name their preference files. For instance, "com.apple.applescript.plist" or "uk.co.introversion.defcon.prefs". Applications should name it like this, and that is for 2 reasons.
1.) An application that just so happened to share the same name as another avoids this problem as the company and address tag are probable not the same. "org.argo.Uplink.plist" and "com.apple.Uplink.plist" Uplink in one context refers to a game, and in another, refers to some other networking application. Makes it plain and simple, and avoids file creation confusion.
2.) Allows the user to quickly shift through and find specific preference files they wish to delete so that the application and generate another upon launch (clean start). A GUI application later on can come and provide an even more simple and direct way of managing the preference folder. Which can provide even more advantages for the user/developer.

bokaboi wrote on the 28 Nov 08 at 14:57
The results I'd like to see from a dir entry
concorde@BenjaminsLappy:/etc$ dir
/acpi /gre.d passwd
adduser.conf /groff passwd-
adjtime group /pcmcia
aliases group- /perl
/alternatives /grub.d /pm
.hiddenfile ./hiddenfolder

Just a snippet of my etc folder modified with my idea.

I think files should be the names on their own eg text1.txt
Hidden folders should have the dot before them eg .text2.txt
Folders should have a forward slash before them eg /folder1
And hidden folders would have a dot and a slash eg ./folder2


AndrewLuecke wrote on the 29 Nov 08 at 00:17
@elisee. Umm, how can this be a dupe of an idea which is 5000 ideas later then mine?

Either way, there are only recommendations, nobody seems to have officially standardised around anything yet unfortunately.

Basedir is admittedly getting close to standardisation, but either way, freedesktop is a recommendations committee. Its not over until at the very least gnome standardises its code around it. And Canonical should help to do so.

I added support for the basedir standard in my own code, and it wasn't hard, so I don't believe it should be hard to do so in the gnome code either

simo_magic wrote on the 14 Dec 08 at 16:45
the standard directory already exists. it is ~/.config and it is a freedesktop standard

No way to destroy the UNIX standard of .directory hidden in the home with the OSX method.

so, what's the idea? a standard directory(the one we already have) or a forced "Library" or "Settings" visible and non-hidden directory?

AndrewLuecke wrote on the 15 Dec 08 at 00:10
@simo_magic Actually, thats not the freedesktop standard I think.. Basedir which uses a variable is I believe, but regardless, we still need to get people to use it.

This was posted well before I was aware of basedir. Regardless though, we should be submitting patches to every project in the official repository to ensure they comply with basedir

simo_magic wrote on the 17 Dec 08 at 16:38
freedesktop it isn't a de facto standard on every application, you're right. the result it is necessary integrate this standard in all the ubuntu programs, just to start.

but if we have to discuss on this idea it remains my question:

"so, what's the idea? a standard directory(the one we already have) or a forced "Library" or "Settings" visible and non-hidden directory?"

whitout an answer i can't vote it.

AndrewLuecke wrote on the 17 Dec 08 at 23:21
Even if people are standardising around .config, even alot of the default applications aren't using it.

Everything that ships with ubuntu should comply with the standard (even if its Basedir) fully. Because at the moment, some apps do, some apps dont. All default programs should

I agree with Basedir though, because either way, its a standardised method of doing it (and if people want access to .config, a symbolic link makes that easy).

With basedir though, since it uses a variable, people can change the name of the directory and move it as they will. So with basedir, we will have the flexibility to later rename the directory in 1 click if we want


Post your comment