--- terminal/terminal-screen.c.orig 2010-04-06 10:29:58.000000000 +0200 +++ terminal/terminal-screen.c 2010-04-06 10:33:32.000000000 +0200 @@ -475,29 +475,30 @@ } else { - pw = getpwuid (getuid ()); - if (G_UNLIKELY (pw == NULL)) + shell_fullpath = g_getenv ("SHELL"); + if (shell_fullpath == NULL) { - g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_INVAL, - _("Unable to determine your login shell.")); - return FALSE; + pw = getpwuid (getuid ()); + if (G_UNLIKELY (pw == NULL)) + { + g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_INVAL, + _("Unable to determine your login shell.")); + return FALSE; + } + + if (pw->pw_shell == NULL || *(pw->pw_shell) == 0) + { + /* the very last fallback */ + shell_fullpath = "/bin/sh"; + } + else + shell_fullpath = pw->pw_shell; } g_object_get (G_OBJECT (screen->preferences), "command-login-shell", &command_login_shell, NULL); - - if (pw->pw_shell == NULL || *(pw->pw_shell) == 0) - { - shell_fullpath = g_getenv ("SHELL"); - if (shell_fullpath == NULL) - /* the very last fallback */ - shell_fullpath = "/bin/sh"; - } - else - shell_fullpath = pw->pw_shell; - if (shell_fullpath != NULL) shell_name = strrchr (shell_fullpath, '/');