Diffstat (limited to 'core/apps/embeddedkonsole/konsole.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index f4ca0bf..5c40569 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -214,16 +214,22 @@ static void konsoleInit(const char** shell) { | |||
214 | odebug << "keyboard grabbed" << oendl; | 214 | odebug << "keyboard grabbed" << oendl; |
215 | #ifdef FAKE_CTRL_AND_ALT | 215 | #ifdef FAKE_CTRL_AND_ALT |
216 | odebug << "Fake Ctrl and Alt defined" << oendl; | 216 | odebug << "Fake Ctrl and Alt defined" << oendl; |
217 | QPEApplication::grabKeyboard(); // for CTRL and ALT | 217 | QPEApplication::grabKeyboard(); // for CTRL and ALT |
218 | #endif | 218 | #endif |
219 | 219 | ||
220 | if (!shell) { | ||
221 | owarn << "No double pointer 'shell'" << oendl; | ||
222 | return; | ||
223 | } | ||
224 | |||
220 | *shell = getenv("SHELL"); | 225 | *shell = getenv("SHELL"); |
221 | owarn << "SHell initially is " << *shell << "" << oendl; | 226 | if (*shell) |
227 | owarn << "Current shell: " << *shell << "" << oendl; | ||
222 | 228 | ||
223 | if (shell == NULL || *shell == '\0') { | 229 | if (*shell == NULL || **shell == '\0') { |
224 | struct passwd *ent = 0; | 230 | struct passwd *ent = 0; |
225 | uid_t me = getuid(); | 231 | uid_t me = getuid(); |
226 | *shell = "/bin/sh"; | 232 | *shell = "/bin/sh"; |
227 | 233 | ||
228 | while ( (ent = getpwent()) != 0 ) { | 234 | while ( (ent = getpwent()) != 0 ) { |
229 | if (ent->pw_uid == me) { | 235 | if (ent->pw_uid == me) { |