[arch-general] How to safe configs to another path than ~

Alex Jordan alexander3223098 at gmail.com
Fri Jul 26 00:20:05 EDT 2013

On Thu, Jul 25, 2013 at 10:19 AM, Jörg Tobias Borgert
<mail at tobias-borgert.de> wrote:
> On 25.07.2013 11:33, Ralf Mardorf wrote:
>>         -------- Cancelled posting --------
>>                 On Thu, 2013-07-25 at 18:46 +1000, Gaetan Bisson wrote:
>>                 > Applications have different means of finding out what the HOME directory
>>                 > of a given user is. The HOME environment variable is just one of them.
>>                 > Other popular ones include the function calls getpwuid() and getpwuid();
>>                 > they basically read the data from /etc/passwd so your only way to work
>>                 > around that and pretend having a different home directory would be to
>>                 > override those calls with LD_PRELOAD...
>>                 Thank you Gaetan,
>>                 but this fails too:
>>                 $ LD_PRELOAD=/home/rocketmouse/alt_profiles/1/ /usr/bin/xfce4-terminal
>>                 ERROR: ld.so: object '/home/rocketmouse/alt_profiles/1/' from LD_PRELOAD
>>                 cannot be preloaded: ignored.
>>                 Regards,
>>                 Ralf
>>         -------- End of cancelled posting --------
>> Assumed I would be able to do it, then I need to write new calls that
>> will replace those calls?
> Maybe my suggestion produces some major drawbacks that I don't recognize
> at the moment, but couldn't you just use symlinks for the conf files &
> dirs and change those symlinks' targets via scripts if you want to use a
> different configuration? Or make /home/yourusername a symlink to the
> home directory you want to use at the moment?
Even better, you could have an intermediary directory symlink that you
could swap out easily without the overhead of writing scripts to do
what you want.
For example if you wanted to work with .zshrc you would symlink
~/.zshrc to ~/intermediary/.zshrc, but ~/intermediary would also be a
symlink to wherever your profile was really stored. Then you could
just recreate ~/intermediary pointing to a different profile whenever
you wanted to swap.

More information about the arch-general mailing list