I would like to get some practice using different shells (zsh and ksh, etc...) What is the best way to set it up so I can create a shortcut that will launch a terminal with the desired shell? I'd rather not set up another account or have to chsh each time if possible, but would love to see all my options. As a bonus I would love to see links to resources for learning various different shells.
Asked
Active
Viewed 804 times
1
-
possible duplicate of Can I put more applications in a Unity icon? – muru Feb 12 '15 at 16:30
-
@muru I don't really think that is what the OP is looking for, although it is related. – Seth Feb 15 '15 at 17:00
1 Answers
1
The shortcuts would depend on what terminal you are using. However, most accept the -e
option to specify what program to run. Therefore, for zsh
you could do:
x-terminal-emulator -e zsh
Or, this approach to have a login shell:
x-terminal-emulator -e 'zsh -l'
You could then add these as aliases on your default shell or, if you prefer to have a launcher on Ubuntu's dash, create a file inside ~/.local/share/applications
with the extension .desktop
and these lines:
[Desktop Entry]
Name=Zsh-Terminal
Comment=Use zsh in the command line
Exec=zsh
Terminal=true
Icon=utilities-terminal
Type=Application
Make this file executable and drag it to the dash.
Read more about the difference between login and non login shell.

aguslr
- 1,796
-
1Instead of hardcoding
gnome-terminal
, tryx-terminal-emulator
instead. And you can do:gnome-terminal -e zsh
instead of usingSHELL
. Better yet, if you're using one launcher per shell, simply specify the shell (Exec=zsh
) and setTerminal=true
. – muru Feb 12 '15 at 17:38 -
@muru, my first idea was to use your approach but then using
-e zsh
doesn't make it a login shell. Same thing when just usingExec=zsh
in the.desktop
file. I'll edit to add both options and also good point about usingx-terminal-emulator
. – aguslr Feb 12 '15 at 17:50 -
1That depends on whether you have enabled login shells in your terminal emulator (you may have, I haven't, OP may or may not have). Use the
-l
option if that's a problem:Exec=zsh -l
, orx-terminal-emulator -e 'zsh -l'
. – muru Feb 12 '15 at 17:51 -