xterm

Linux, Xterm, and VIM localization behavior of setenv LANG vs. setenv LC_CTYPE

为君一笑 提交于 2019-12-13 05:05:11
问题 I am writing some perl scripts to process some files with Japanese names and contents. I wanted to see the file names when I do ls in xterm, instead of garbage characters. Here is my configuration: Client OS: Windows XP Japan Server: Red Hat Enterprise Linux Server release 6.2 VIM : VIM version 7.2.411 Xterm : ASTEC-X version 6.0 CSH: tcsh 6.17.00 (Astron) After I updated my .cshrc to use setenv LANG ja_JP.UTF.8, and re-open my xterm window, it was really hard for me to back out because of

How curses preserves screen contents?

假如想象 提交于 2019-12-12 12:49:47
问题 When you start the (n)curses program, it will remove the scroll bar from your terminal emulator, clear the screen, the scroll log (history) will also disappear. When you exit the program, the screen contents reappears, the scroll bar returns, and the scroll buffer returns. How ncurses does it? I have studied all ANSI escape codes, I cannot see anything that can do such things. What is the technology behind this? 回答1: This is discussed at length in the xterm FAQ Why doesn't the screen clear

vim in Cygwin replaces first character with 'g' on opening a file

爱⌒轻易说出口 提交于 2019-12-12 08:55:41
问题 I use vim in Cygwin terminal. It was working fine. Recently, I added a package in Cygwin which caused update of vim and some other components. Now when I open any file in vim, the first character in the file gets replaced with character 'g'. I tried removing .vimrc and all files in .vim folder in my home folder. But the problem persists. To understand the problem, I opened a file using 'vim -E'. On opening, I see the following at the bottom of the window: Entering Ex mode. Type "visual" to go

Python terminal emulation

依然范特西╮ 提交于 2019-12-12 08:49:55
问题 I'd like to have an xterm-compatible virtual terminal running inside a Python app. I'll need to run ncurses-based applications inside it, feed it with user's input and read its output. So far I've found python-vte, but it only provides a GTK+ widget (libvte has the required VtePty class, but Python bindings don't) and has an unacceptable libgtk dependency. Is there any other way to perform a teminal emulation in Python? 回答1: After all, I've found the pyte, which is exactly what I wanted. 回答2:

Multiple xterm pseudoterminals used as output only from multiple threads

泄露秘密 提交于 2019-12-12 02:59:00
问题 I have been working on launching several threads from my program from which I'd like each of them to output to their respective terminal windows (that I have popping up in a tiled pattern). They are not shells, just terminal windows for output. I'm coding on ubuntu in C. I have it working, but for some reason, after a few minutes it's as though the xterm display buffers fill up (independent of one another) and they stop displaying new text. The old text remains, the threads keep doing their

How to use xterm with -S option?

只谈情不闲聊 提交于 2019-12-11 17:00:03
问题 I am trying to automate xterm and it mainly relies on the -S option while launching the xterm . From man page -Sccn This option allows xterm to be used as an input and output channel for an existing program and is sometimes used in spe‐ cialized applications. The option value specifies the last few letters of the name of a pseudo-terminal to use in slave mode, plus the number of the inherited file descriptor. If the option contains a “/” character, that delimits the characters used for the

running Rscript containing ggplot from linux command line through Xterm

。_饼干妹妹 提交于 2019-12-11 14:28:23
问题 I am using Xterm on a linux server so I can quickly plot data without transferring the files to my local machine. I have a R script that uses ggplot() , not inside a function. When I open R through Xterm I use these commands to run the script and the plot windows works fine in Xterm commandArgs <- function(...) 'plotname' source('graph.r', print.eval=TRUE)) However when I try from bash with Rscript, such as Rscript graph.r plotname The script runs but the plot window doesn't open. I know this

xterm dump of full scrollable window content

故事扮演 提交于 2019-12-11 01:58:41
问题 I want to know if anyone does know a way to dump or copy the whole lot of viewable messages in a xterm window on linux. The very important thing is I don't want to know how to send a command out and kapture its output for stream 1 and 2 as well as the input, as this is well known to me. I may explain for what this is needed. You do something and expect not any complications but than you got pages of msg's als err msg or normal output. To be able to see later after it you should be able to get

NCurses: Why does init_color return OK but still not set the color?

痴心易碎 提交于 2019-12-10 17:32:33
问题 I am attempting to set the background of a block of text to red by setting the value COLOR_BLUE to the rgb values of: (1000, 0, 0). The background is correct (RED) if I use Gnome's "Terminal" application, but incorrect (BLUE) if I use KDE's "Konsole". Why is this? The following code will compile on Linux with the compile line: g++ filename.cpp -lcurses I set my TERM type to xterm-256color via: export TERM=xterm-256color here's the code: #include <ncurses.h> #include <cassert> #include

xterm keep page from less in terminal after exit

二次信任 提交于 2019-12-10 15:10:36
问题 I often view files using less and want to remember what i have just seen in the file. However when I quit less by pressing the q key my xterm window removes the page of less showing the file and only shows my command prompt. How do I keep the less output on my terminal when I quit? 回答1: less -X Use the -X option from the less man page described below: -X or --no-init Disables sending the termcap initialization and deinitialization strings to the terminal. This is sometimes desirable if the