https://wiki.archlinux.org/api.php?action=feedcontributions&user=Aheaume&feedformat=atomArchWiki - User contributions [en]2024-03-19T08:35:08ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User:Aheaume/Libetc&diff=87359User:Aheaume/Libetc2009-12-11T12:17:10Z<p>Aheaume: </p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
This is for those who are tired of having a messy $HOME folder cluttered with loads of dotfiles/dotfolders.<br />
<br />
libetc is a LD_PRELOAD-able shared library<br />
that intercepts file operations: if a program tries to open a dotfile in<br />
$HOME, it is redirected to $XDG_CONFIG_HOME, [http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html as defined by freedesktop].<br />
<br />
=How it works=<br />
<br />
When an application tries to acces $HOME/.foobar, the call is redirected to XDG_CONFIG_HOME/foobar<br />
<br />
=Installation=<br />
libetc is available in the [[AUR]], so use your favorite method to install it.<br />
<br />
=Configuration=<br />
<br />
''I use bash, but this should work for other shells too.''<br />
<br />
Open ~/.bashrc and add :<br />
<br />
export XDG_CONFIG_HOME=/anywhere/you/want <br />
export LD_PRELOAD=libetc.so.0<br />
export LIBETC_BLACKLIST=/bin/cp:/bin/ln:/bin/ls:/bin/mv:/bin/rm:/usr/bin/find<br />
<br />
XDG_CONFIG_HOME defaults to ~/.config if unset. Applications in LIBETC_BLACKLIST will access dotfiles the regular way.<br />
<br />
At that point, you might want to have every dotfile/dotfolder that was previously in your $HOME in $XDG_CONFIG_HOME and strip out the dot in their name. If you don't, new files will be created in $XDG_CONFIG_HOME and/or "File not found" errors will appear. Read "Exceptions" below.<br />
<br />
Then source your .bashrc :<br />
<br />
source ~/.bashrc<br />
<br />
=Exceptions=<br />
Those files need to be in your $HOME, but you can link them into $XDG_CONFIG_HOME if you need to.<br />
<br />
* .bashrc<br />
* .bash_history<br />
* .bash_profile<br />
<br />
(feel free to add more if you find some)<br />
<br />
=Homepage=<br />
Be sure to read the README there : http://ordiluc.net/fs/libetc</div>Aheaumehttps://wiki.archlinux.org/index.php?title=User:Aheaume/Libetc&diff=87358User:Aheaume/Libetc2009-12-11T12:16:39Z<p>Aheaume: Created page with 'Category:HOWTOs (English) =Introduction= This is for those who are tired of having a messy $HOME folder cluttered with loads of dotfiles/dotfolders. libetc is a LD_PRELOAD-…'</p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
This is for those who are tired of having a messy $HOME folder cluttered with loads of dotfiles/dotfolders.<br />
<br />
libetc is a LD_PRELOAD-able shared library<br />
that intercepts file operations: if a program tries to open a dotfile in<br />
$HOME, it is redirected to $XDG_CONFIG_HOME, [http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html as defined by freedesktop].<br />
<br />
=How it works=<br />
<br />
When an application tries to acces $HOME/.foobar, the call is redirected to XDG_CONFIG_HOME/foobar<br />
<br />
=Installation=<br />
libetc is available in the [[AUR]], so use your favorite method to install it.<br />
<br />
=Configuration=<br />
<br />
''I use bash, but this should work for other shells too.''<br />
<br />
Open ~/.bashrc and add :<br />
<br />
export XDG_CONFIG_HOME=/anywhere/you/want <br />
export LD_PRELOAD=libetc.so.0<br />
export LIBETC_BLACKLIST=/bin/cp:/bin/ln:/bin/ls:/bin/mv:/bin/rm:/usr/bin/find<br />
<br />
XDG_CONFIG_HOME defaults to ~/.config if unset. Applications in LIBETC_BLACKLIST will access dotfiles the regular way.<br />
<br />
At that point, you might want to have every dotfile/dotfolder that was previously in your $HOME in $XDG_CONFIG_HOME and strip out the dot in their name. If you don't, new files will be created in $XDG_CONFIG_HOME and/or "File not found" errors will appear. Read [[Libetc#Exceptions]] below.<br />
<br />
Then source your .bashrc :<br />
<br />
source ~/.bashrc<br />
<br />
=Exceptions=<br />
Those files need to be in your $HOME, but you can link them into $XDG_CONFIG_HOME if you need to.<br />
<br />
* .bashrc<br />
* .bash_history<br />
* .bash_profile<br />
<br />
(feel free to add more if you find some)<br />
<br />
=Homepage=<br />
Be sure to read the README there : http://ordiluc.net/fs/libetc</div>Aheaume