No, the -ls
option to xterm
doesn't take an argument, it just specifies that the shell that xterm
start should be a login shell.
Here's the complete section on the -ls
flag with the part which is relevant to your issue highlighted:
-ls This option indicates that the shell that is started in the
xterm window will be a login shell (i.e., the first character
of argv[0] will be a dash, indicating to the shell that it
should read the user's .login or .profile).
The -ls flag and the loginShell resource are ignored if -e is
also given, because xterm does not know how to make the shell
start the given command after whatever it does when it is a
login shell - the user's shell of choice need not be a Bourne
shell after all. Also, xterm -e is supposed to provide a
consistent functionality for other applications that need to
start text-mode programs in a window, and if loginShell were
not ignored, the result of ~/.profile might interfere with
that.
If you do want the effect of -ls and -e simultaneously, you may
get away with something like
xterm -e /bin/bash -l -c "my command here"
Finally, -ls is not completely ignored, because xterm -ls -e
does write a /var/run/wtmp entry (if configured to do so),
whereas xterm -e does not.
zsh
as the default shell, I addedSHELL=/bin/zsh
to my environment variables:echo "SHELL=/bin/zsh" >> /etc/environment
. After that, logging out and in again should do the trick – Seraf Dec 5 '19 at 15:02