From 035ac94c17f395dc928a79a61dc7afdf810cc3e7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 3 Feb 2012 20:58:19 +1000 Subject: [PATCH] terminal: run $SHELL if set Signed-off-by: Peter Hutterer --- clients/terminal.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clients/terminal.c b/clients/terminal.c index 0792ecca..7eb1dc2b 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -2372,6 +2372,7 @@ int main(int argc, char *argv[]) { struct display *d; struct terminal *terminal; + const char *shell; d = display_create(&argc, &argv, option_entries); if (d == NULL) { @@ -2379,8 +2380,12 @@ int main(int argc, char *argv[]) return -1; } + shell = getenv("SHELL"); + if (!shell) + shell = "/bin/bash"; + terminal = terminal_create(d, option_fullscreen); - if (terminal_run(terminal, "/bin/bash")) + if (terminal_run(terminal, shell)) exit(EXIT_FAILURE); display_run(d);