From 53a21f61d99d62e62412e1b5ca9bde085b25bde5 Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 22 Oct 2002 14:25:05 +0000 Subject: set $TERM in MyPty according to the terminal type emulation_handler set the keyfilter right for the right terminal filetransfer fix warnings profile add Linux, XTerm as Emulation options TerminalWidget add Linux,XTerm --- (limited to 'noncore/apps/opie-console/MyPty.cpp') 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) ttmode.c_cc[VINTR] = 3; ttmode.c_cc[VERASE] = 8; tcsetattr( STDIN_FILENO, TCSANOW, &ttmode ); - setenv("TERM","vt100",1); + setenv("TERM",m_term,1); setenv("COLORTERM","0",1); if (getuid() == 0) { @@ -236,8 +236,23 @@ int MyPty::openPty() /*! Create an instance. */ -MyPty::MyPty(const Profile&) : m_cpid(0) +MyPty::MyPty(const Profile& prof) : m_cpid(0) { + + int term = prof.readNumEntry("Terminal", Profile::VT100 ); + switch( term ) { + default: + case Profile::VT100: + case Profile::VT102: + m_term = "vt100"; + break; + case Profile::Linux: + m_term = "linux"; + break; + case Profile::XTerm: + m_term = "xterm"; + break; + } m_sn_e = 0l; m_sn_r = 0l; m_fd = openPty(); -- cgit v0.9.0.2