summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/MyPty.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/MyPty.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp
index b0f0275..c3c58be 100644
--- a/noncore/apps/opie-console/MyPty.cpp
+++ b/noncore/apps/opie-console/MyPty.cpp
@@ -291,7 +291,22 @@ void MyPty::close() {
291} 291}
292void MyPty::reload( const Profile& prof) { 292void MyPty::reload( const Profile& prof) {
293 m_env.clear(); 293 m_env.clear();
294 m_cmd = prof.readEntry("Command", "/bin/bash"); 294 m_cmd = prof.readEntry("Command", "/bin/sh");
295
296 /*
297 * Lets check if m_cmd actually
298 * exists....
299 * we try to use bin/bash and if
300 * this fails we
301 * will fallback to /bin/sh
302 * which should be there 100%
303 */
304 if ( !QFile::exists(QFile::encodeName(m_cmd) ) )
305 if (QFile::exists("/bin/bash") )
306 m_cmd = "/bin/bash";
307 else
308 m_cmd = "/bin/sh";
309
295 int envcount = prof.readNumEntry("EnvVars", 0); 310 int envcount = prof.readNumEntry("EnvVars", 0);
296 for (int i=0; i<envcount; i++) { 311 for (int i=0; i<envcount; i++) {
297 QString name = prof.readEntry("Env_Name_" + QString::number(i), ""); 312 QString name = prof.readEntry("Env_Name_" + QString::number(i), "");