> Another option is to put the following lines in the /.profile (assuming
> it exists):
> ### set any generic environment variables and export them
> if [ -x /usr/bin/ksh ] ## or whatever shell/path you want
> then
> SHELL=ksh # no path needed here
> export SHELL
> exec ksh # no path needed here either
> fi
> I have used this for several years now with no negative effects that I
> have found. Setting the SHELL variable inside the if will ensure that
> subshells from vi, etc. as well as terminal windows under CDE or
> OpenWindows will run your preferred shell. And when your preferred
> shell is not available, you will get the old standby /sbin/sh so
> hopefully the best of two worlds.
> On computers where a user who needs root access wants to use a
> shell other than /sbin/sh, one option is to create another root
> account with the desired shell. For example (in the /etc/passwd
> file, with corresponding entries in the /etc/shadow file):
> root:x:0:1:Super-User:/:/sbin/sh
> rootksh:x:0:1:Super-User:/:/usr/bin/ksh
i have much simpler idea that requires no changes to anything in the
passwd file or .profile
i define this shell function in my personal .bashrc. it should work
under ksh or sh. i have not tried that but it should be easy to fix. the
-login is bash specific and it is needed so you get the root's .bashrc
read. if you don't ant hat you can delete it or change it for another
shell's login force option.
function xtroot() {
(my_xterm -T root -n root -e su - root -c "exec $SHELL -login" &)
Quote:}
it creates a new xterm with the shell you desire (your current
shell). the su command in the xterm asks you for the password. when you
exit the su, the xterm leaves.
works like a charm!
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---- 8 Years of Perl Experience, Available Immediately
Use the Best Search Engine on the Net -------- http://www.northernlight.com