On Sun, Jan 24, 2010 at 7:49 PM, Allan McRae <allan@xxxxxxxxxxxxx> wrote: > I am trying to seamlessly run an x86_64 kernel on my i686 machine. I have > enough aliases that most things work right (prefixing with linux32), but > bash can not handle setting e.g. "./configure" as an alias and there is > always something I have missed. > > So, I came up with a cunning plan... Create a script /bin/bash32 which just > runs "linux32 /bin/bash", then add /bin/bash32 to /etc/shells and run "chsh > -s /bin/bash32". > > It works in a way... when I run uname, it tells me I am using the i686 > kernel. Success! Now the bad part... my $PATH gets reduced to: > > /home/allan/bin:/bin:/usr/bin > > The /home/allan/bin part tells me that my ~/.bashrc is being sourced, as > does my prompt and all my aliases. So something else is being missed. > The /bin:/usr/bin is the minimum path defined in /etc/login.defs. > > All the rest is in /etc/profile and the various /etc/profile.d scripts. Why > are they not being sourced... Or are they being sourced and then I open up > a new shell with my script which gets rid of them? You probably want a login shell, e.g. /bin/bash -l