Create a file called ".profile" in your home directory. In it, put the path to your shell of choice (/usr/local/bin/tcsh for example). That worked for me.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=73238\"][{POST_SNAPBACK}][/a][/div]
that will spawn 2 shells, bash/sh and tcsh as child
[div align=\"right\"][a href=\"index.php?act=findpost&pid=74935\"][{POST_SNAPBACK}][/a][/div]
Yes, that will spawn 2 shells. It's also a bad idea (from the standpoint of *nix administration) to have root's .profile blindly call or exec another shell. If the system is corrupted and you need to boot into single-user mode to do disk recovery, you don't want a .profile that launches another shell.
Try the following script. Note that you'll need to change $MYSHELL, and you may want to eliminate the section where root's $HOME directory is reassigned. This is useful in a Solaris environment where root's home directory is /.
#################################################
/bin/echo "bash? [Y|n]\c"
read ans
if [ "X$ans" = "X" -o -z $ans -o "X$ans" = "Xy" -o "X$ans" = "XY" ] ; then
MYSHELL=/usr/bin/bash
if [ "$SHELL" != "$MYSHELL" ] ; then
MYSHELLCMD="-c" # option to run a single command
# bash -c
# [t]csh -e
MYSHELLLOGIN="--login" # otion to specify a login shell
# bash --login
# [t]csh -l
/bin/ls /tmp> /dev/null 2> /dev/null
# OK, the system isn't hosed... continue
if [ $? -eq 0 ] ; then
if [ -x $MYSHELL ] ; then
$MYSHELL $MYSHELLCMD "exit 0"
if [ $? -eq 0 ] ; then
# The shell was able to execute something
if [ -d /export/home/root ] ; then
HOME=/export/home/root ; export HOME
fi
if [ -d /home/root ] ; then
HOME=/home/root ; export HOME
fi
export MYSHELL
SHELL=$MYSHELL ; export SHELL
cd
echo "exec()ing $MYSHELL $MYSHELLLOGIN"
exec $MYSHELL $MYSHELLLOGIN
else
# If we get to here, then we couldn't start up
# the chosen shell...but we've still got /sbin/sh
# as our shell...
echo "Could not run $MYSHELL"
fi
fi
fi
fi
fi
#################################################
Mark