summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole
Side-by-side diff
Diffstat (limited to 'core/apps/embeddedkonsole') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/MyPty.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/MyPty.cpp b/core/apps/embeddedkonsole/MyPty.cpp
index 6421ab0..9adc248 100644
--- a/core/apps/embeddedkonsole/MyPty.cpp
+++ b/core/apps/embeddedkonsole/MyPty.cpp
@@ -64,6 +64,7 @@
*/
+#include <qfileinfo.h>
#include <qapplication.h>
#include <qsocketnotifier.h>
#include <qstring.h>
@@ -169,8 +170,10 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int)
char msg[] = "WARNING: You are running this shell as root!\n";
write(ttyfd, msg, sizeof(msg));
}
-; //creates a login shell
- execl(cmd, cmd, "--login", 0);
+
+ QString ccmd = "-"+QFileInfo(cmd).fileName(); //creates a login shell
+
+ execl(cmd, ccmd.latin1(), 0);
donePty();
exit(-1);