terminal: use /bin/sh as the default shell

When trying to get Weston to run on a new system I was building up bit
by bit, I encountered a problem: when I started weston-terminal, it
would close a split second later.  This turned out to be because
weston-terminal defaults to trying to spawn /bin/bash, which my
busybox-based system didn't have.

I can configure the terminal to use a shell I do have, of course, but I
think /bin/sh is a much friendlier default, because it's more likely to
exist (POSIX requires it), and will save people just trying to get
started with Weston from the confusing experience I had.  I think it's
better overall that somebody who specifically wants /bin/bash has to
configure that (if they even have to — depending on how they're running
Weston, $SHELL might already be /bin/bash) than somebody who just wants
to see the terminal working debug why it won't launch at all.

I realise there might be a (small) backward compatibility concern here
as well, but I hope I've made the case for a friendlier default.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
dev
Alyssa Ross 3 years ago committed by Marius Vlad
parent 0d5ce4fb3e
commit 6e2eb8fa94
  1. 2
      clients/terminal.c

@ -3138,7 +3138,7 @@ int main(int argc, char *argv[])
option_shell = getenv("SHELL");
if (!option_shell)
option_shell = "/bin/bash";
option_shell = "/bin/sh";
config_file = weston_config_get_name_from_env();
config = weston_config_parse(config_file);

Loading…
Cancel
Save