terminal: run $SHELL if set

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
dev
Peter Hutterer 13 years ago committed by Kristian Høgsberg
parent 3bd6917199
commit 035ac94c17
  1. 7
      clients/terminal.c

@ -2372,6 +2372,7 @@ int main(int argc, char *argv[])
{ {
struct display *d; struct display *d;
struct terminal *terminal; struct terminal *terminal;
const char *shell;
d = display_create(&argc, &argv, option_entries); d = display_create(&argc, &argv, option_entries);
if (d == NULL) { if (d == NULL) {
@ -2379,8 +2380,12 @@ int main(int argc, char *argv[])
return -1; return -1;
} }
shell = getenv("SHELL");
if (!shell)
shell = "/bin/bash";
terminal = terminal_create(d, option_fullscreen); terminal = terminal_create(d, option_fullscreen);
if (terminal_run(terminal, "/bin/bash")) if (terminal_run(terminal, shell))
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
display_run(d); display_run(d);

Loading…
Cancel
Save