Using a non-standard shell as your login shellSuppose that you want to use a non-standard shell as your login shell (for the purposes of this, 'non-standard' means that it's not installed system-wide; you have to compile your own version). Further suppose, for the sake of argument, that the shell you want to use doesn't have a command-line option to tell it to be a login shell. If your shell did have such a command line option, using it as your
login shell would be simple. Set your system shell to SHELL=$HOME/bin/shell; export SHELL exec $SHELL --login (This doesn't work on some systems in some circumstances, but that's another entry entirely.) Without such an option, you need some way to make your non-standard
shell think that it is being run as a login shell by (This works because the entire argument list, including the program name (aka 'argument zero'), is entirely up to the program that runs you; it need not have anything to do with your actual file name.) This really means the first character, which means that you need some
way to make the first character be a ' This gives you the magic incantation: SHELL=$HOME/bin/shell PATH=$HOME/bin:$PATH export SHELL PATH exec -shell (Then you run into a bash irritation.) |
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |