Wednesday, January 16, 2008

Seperation of configuration files in user directories

User directories on linux 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 ., 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.

From experience dealing with Apple (who uses this method/or a very similar method), dealing with Microsoft and dealing with Linux, Apple's method is easily the most effective.

Unfortunately, it may require a few modifications to programs to support fully.

Untested programs will still work, but put settings in the wrong spot. You can still create a symlink to those directories though easily with 1 line of code, to support both concepts, so nobody loses.

No comments: