[PATCH] terminal: run $SHELL if set
Peter Hutterer
peter.hutterer at who-t.net
Fri Feb 3 02:58:19 PST 2012
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
clients/terminal.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/clients/terminal.c b/clients/terminal.c
index e5baa0e..2cb1e58 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2370,6 +2370,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) {
@@ -2377,8 +2378,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);
--
1.7.7.5
More information about the wayland-devel
mailing list