summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/MyPty.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/MyPty.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp
index 6b0d6f2..16bb5ff 100644
--- a/noncore/apps/opie-console/MyPty.cpp
+++ b/noncore/apps/opie-console/MyPty.cpp
@@ -175,7 +175,7 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int)
175 ttmode.c_cc[VINTR] = 3; 175 ttmode.c_cc[VINTR] = 3;
176 ttmode.c_cc[VERASE] = 8; 176 ttmode.c_cc[VERASE] = 8;
177 tcsetattr( STDIN_FILENO, TCSANOW, &ttmode ); 177 tcsetattr( STDIN_FILENO, TCSANOW, &ttmode );
178 setenv("TERM","vt100",1); 178 setenv("TERM",m_term,1);
179 setenv("COLORTERM","0",1); 179 setenv("COLORTERM","0",1);
180 180
181 if (getuid() == 0) { 181 if (getuid() == 0) {
@@ -236,8 +236,23 @@ int MyPty::openPty()
236/*! 236/*!
237 Create an instance. 237 Create an instance.
238*/ 238*/
239MyPty::MyPty(const Profile&) : m_cpid(0) 239MyPty::MyPty(const Profile& prof) : m_cpid(0)
240{ 240{
241
242 int term = prof.readNumEntry("Terminal", Profile::VT100 );
243 switch( term ) {
244 default:
245 case Profile::VT100:
246 case Profile::VT102:
247 m_term = "vt100";
248 break;
249 case Profile::Linux:
250 m_term = "linux";
251 break;
252 case Profile::XTerm:
253 m_term = "xterm";
254 break;
255 }
241 m_sn_e = 0l; 256 m_sn_e = 0l;
242 m_sn_r = 0l; 257 m_sn_r = 0l;
243 m_fd = openPty(); 258 m_fd = openPty();