I would like to change the default shell in each terminal emulator separately. To clarify, I want
xterm to use
pterm to use
gnome-terminal to use
bash, etc. Is this possible? If so, how can this be accomplished?
Each terminal emulator has its custom way to select which shell to run:
- gnome-terminal has the
run a custom command instead of my shellfield in the profile editor.
- xterm (and pterm) uses
xrdb databaseto store its configuration but do not allow to configure the command to run. You could write a simple shell script that wraps the xterm executable to give him an executable parameter.
- konsole has the
commandfield in the profile editor.
So you need to discover, by reading the manual, how (and if) each terminal emulator can be configured. There is no common way :-(
If you need only a simple way to choose which shell to run, I strongly suggest you to choose a terminal emulator that supports profiles (like gnome-terminal) and to create a different profile for each shell type. This way you'll can launch a new tab or window running the needed shell by the gnome-terminal internal menu (and, as bonus, choose a different text color for each shell).
As a quick and contained solution, you could make a wrapper script.
case "$1" in xterm) shell=/bin/tcsh ;; pterm) shell=/bin/pysh ;; gnome-terminal) shell=/bin/bash ;; *) printf "Not supported: %s\n" "$1" >&2 exit 1 esac SHELL="$shell" "$1"
Just use it as such:
It's generally preferable to configure each terminal emulator individually though.