author | zecke <zecke> | 2002-10-22 14:25:05 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-22 14:25:05 (UTC) |
commit | 53a21f61d99d62e62412e1b5ca9bde085b25bde5 (patch) (unidiff) | |
tree | 894a1162468586710213945647d835dd94a3f5f1 /noncore/apps/opie-console/MyPty.cpp | |
parent | e006ea7655b455974ae64c30098eeecb7304508b (diff) | |
download | opie-53a21f61d99d62e62412e1b5ca9bde085b25bde5.zip opie-53a21f61d99d62e62412e1b5ca9bde085b25bde5.tar.gz opie-53a21f61d99d62e62412e1b5ca9bde085b25bde5.tar.bz2 |
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
Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/MyPty.cpp | 19 |
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 | |||
@@ -174,9 +174,9 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int) | |||
174 | tcgetattr( STDIN_FILENO, &ttmode ); | 174 | tcgetattr( STDIN_FILENO, &ttmode ); |
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) { |
182 | char msg[] = "WARNING: You are running this shell as root!\n"; | 182 | char msg[] = "WARNING: You are running this shell as root!\n"; |
@@ -235,10 +235,25 @@ int MyPty::openPty() | |||
235 | 235 | ||
236 | /*! | 236 | /*! |
237 | Create an instance. | 237 | Create an instance. |
238 | */ | 238 | */ |
239 | MyPty::MyPty(const Profile&) : m_cpid(0) | 239 | MyPty::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(); |
244 | ProcCtl* ctl = ProcCtl::self(); | 259 | ProcCtl* ctl = ProcCtl::self(); |