[SPARCbook] Help - THANKS

sunder sparcbook at sunhelp.org
Thu Dec 14 11:58:17 CST 2000


Oscar.G.Farah at census.gov wrote:
> 
> Thanks to sunder at sunder.net, I have "bash" installed and working and
> Netscape working properly as well; and thanks to Russell, I have
> downloaded a lot of interesting information from http://www.kempston.net which I
> will use to try to get the modem working; in addition I found out
> in these downloaded files that the PATH variable is defined at boot by the
> file ".dtprofile" located in the home directory.
> 
>  As I do not have my laptop here; it is at home; I hope that this is
> correct because I would like to modify the default path.
> 
> Does ".dtprofile" also contain the selection of which shell to use at
> boot?  I would like to use the bash shell exclusively.  Thanks

Sadly, no.  At least not with my experimentation.  If you use CDE (the Common Desktop Environment which uses .dtprofile) all sorts
of weird things happen to CDE if you exec or just call bash from .dtprofile.

Rather, you should just set the shell field in the passwd file.  Use the vipw command to do this. Change /bin/csh or /bin/sh to
/usr/local/bin/bash for the account you want, then exit.

If you don't know how to use vi, do a search on google.  Basically, the cursor keys will work fine.  Use i to enter insert mode
(there are all sort of other keys.) Press ESC to get out.  If you're not in insert mode, you can use x to delete.  When you're done
editing the file, press ESC, type in :x! and hit enter.  If you made an error and don't want to mess up the file, use ESC :q! will
exit and quit.

I don't think Solaris 2.6 has a chsh command sadly.

But, there is another trick you can do.  If your account is using csh, you can change the .login and .cshrc files on the last line
to say "exec bash" - it might work.  It's worth trying.

If you know shell programming you can add something like this to .profile. (This is off the top of my head, so it's likely buggy.)

First, go into bash. Then type in echo $0. This should print either bash or /usr/local/bin/bash.  The only box I have available now
as I type this (OpenBSD says "-bash")  Replace the bash in the if statement to this.

Put this line as the last line of your .profile

if [ "$0" != "-bash" ]; then exec /usr/local/bin/bash; fi

You might need to remove the exec in some cases.  CDE is a bit funny about changing the shell.  So again, don't do this to the root
account.  That way, if you get hosed, you can at least login as root and fix it. :)


-- 
----------------------Kaos-Keraunos-Kybernetos---------------------------
 + ^ + :Surveillance cameras|Passwords are like underwear. You don't /|\
  \|/  :aren't security.  A |share them, you don't hang them on your/\|/\
<--*-->:camera won't stop a |monitor, or under your keyboard, you   \/|\/
  /|\  :masked killer, but  |don't email them, or put them on a web  \|/
 + v + :will violate privacy|site, and you must change them very often.
--------_sunder_ at _sunder_._net_------- http://www.sunder.net ------------



More information about the SPARCBook mailing list