terminal: run $SHELL if set

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2012-02-03 20:58:19 +10:00 committed by Kristian Høgsberg
parent 3bd6917199
commit 035ac94c17

View File

@ -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);