xterm

Emacs, unicode, xterm mouse escape sequences, and wide terminals

杀马特。学长 韩版系。学妹 提交于 2019-11-29 02:46:34
问题 Short version: When using emacs' xterm-mouse-mode, Somebody (emacs? bash? xterm?) intercepts xterm's control sequences and replaces them with \0. This is a pain on wide monitors because only the first 223 columns have mouse. What is the culprit, and how can I work around it? From what I can tell this has something to do with Unicode/UTF-8 support, because it wasn't a problem 5-6 years ago when I last had a big monitor. Gory details follow... Thanks! Emacs xterm-mouse-mode has a well-known

what is terminal escape sequence for ctrl + arrow (left, right,…) in TERM=linux

江枫思渺然 提交于 2019-11-28 21:35:44
I am building a terminal window in a browser (sth. like ajaxterm) and don't know which escape sequence to send to ssh tunnel (opened via paramiko.SSHClient().invoke_shell(term='linux') ). I have found a key logger and tried it in a terminal with $TERM == 'linux', but it returns the same sequence for ctrl+left and left (27,91,68). If I try keylogger in another terminal (with $TERM == 'xterm') I get the codes (27,91,49,59,53,68). But these codes do not move generate the expected output from SSH channel (which would move cursor one word left on a normal linux shell). That is true even if I start

bash command preserve color when piping [duplicate]

不问归期 提交于 2019-11-28 20:12:32
Possible Duplicate: Can colorized output be captured via shell redirect? setup In this case specifically I'm trying to preserve the colors in git status -s when piping it to another command. Some git commands, diff for instance, and other commands like grep have an option --color=always but git status does not. question Is there a way to pipe or capture the output of a command and make it think it is outputting to the xterm shell so it doesn't automatically disable colors? Here's a script snippet using the colorized output of ls as an example (on Mac OS X 10.6). # no colored ls output if

What is the difference between xterm-color & xterm-256color?

妖精的绣舞 提交于 2019-11-28 17:14:33
问题 I've come across both xterm-color and xterm-256color as options when trying to set up my terminal program to use color - i.e. you can set your TERM environment variable to either one. I was wondering if anyone can describe the difference between the two? I've searched for documentation on my Ubuntu server as well as my mac but haven't found any. I've only been able to find various binary files in /usr/share/terminfo . 回答1: xterm-256color describes Xterm with support for 256 colors enabled.

Set screen-title from shellscript

非 Y 不嫁゛ 提交于 2019-11-28 16:39:15
Is it possible to set the Screen Title using a shell script? I thought about something like sending the key commands ctrl + A shift - A Name enter I searched for about an hour on how to emulate keystrokes in an shell script, but didn't find the answer. You can set the screen / xterm title using the following lines: #!/bin/bash mytitle="Some title" echo -e '\033k'$mytitle'\033\\' [UPDATE] - by request I'm also including the solution proposed by @Espo below: Depending on your xterm version or your linux distribution the line above may or may not work and you can try the xterm-defaults: #!/bin

Vim: Difference between t_Co=256 and term=xterm-256color in conjunction with TMUX

我的梦境 提交于 2019-11-28 13:44:47
问题 I am testing the various different terminals that I tend to use to SSH into Linux boxes that I have Tmux set up on. Basically I noticed this behavior, and I am hoping that somebody could offer an explanation of what's going on. Now it may be the case that this is specific behavior that affects the Prompt app. I am using Vim within Tmux, and on Panic's Prompt app on my iPhone5 I was having the behavior that 256 colors were not enabling when the .vimrc set the colors using the set t_Co=256

Reading the RGB values of the console color palette

烂漫一生 提交于 2019-11-28 08:41:15
问题 Meat In C or C++ is there any way to read the color palette RGB values directly? Especially interesting is the extended color space used by xterm (and others) to define up to 256 terminal colors. Potatoes The case in point is that I want to define my own colors (using ANSI escape sequences, like \e]4;3;rgb:cc/78/33\e\\ , or directly in c) but I need to save the users colors before I redefine them (in the unlikely event that they have already redefined their colors) so that I can restore them

How to run a command on the startup of an xterm?

戏子无情 提交于 2019-11-28 04:55:50
问题 How can I run a command on xterm startup i.e. when an xterm terminal is launched a the command is already executed? I have edited the .bashrc file to add this line: xterm "ls" But this does not work. Please suggest what should I do to acheive this. Thanks. 回答1: According to the bash manual, ~/.bashrc is used for interactive shells. xterm runs a shell, so perhaps your "does not work" causes a chain of xterm's. The xterm program sets these environment variables which are useful for scripting:

In linux, how can I test whether the output of a program is going to a live terminal or to a file?

陌路散爱 提交于 2019-11-28 03:26:53
问题 When you use git it seems to magically know whether standard out is going through a pipe or into a file vs when it is being displayed to the console. For example, if you have colors enabled and you do git status it will colorize the output for different categories of files being listed. However, if you do git status | less or git status > status.txt it removes the linux color formatting and you only see plain, uncolored text. How does git detect whether the output of its commands are going to

Bind Ctrl+Tab and Ctrl+Shift+Tab in tmux

痞子三分冷 提交于 2019-11-27 18:20:34
I'm trying to a get a ctrl + tab and ctrl + shift + tab binding to work inside of a tmux session (I'm also using PuTTY). I already went through the pains of having to recompile PuTTY so it would send ctrl and shift correctly. After using ctrl + v , and I'm able to see that ^[[27;5;9~ and ^[[27;6;9~ are being sent for ctrl + tab and ctrl + shift + tab , respectively. Is there any way I can get these bound to next-window and previous-window inside of tmux? Edit: After some research, I'm thinking I might have to configure xterm to include those keycodes. Any idea how I would go about doing that?