gnome-terminal

gnome-terminal (or VTE) sets $TERM to xterm rather than xterm-256color

前提是你 提交于 2019-12-25 16:54:21
问题 Is there a compelling reason why gnome-terminal (and, under the hood, maybe the VTE widget) sets $TERM to xterm rather than xterm-256color ? Clearly it supports 256 colors. For a while, I had a line in my .bashrc / .zshrc to simply export TERM=xterm-256color , because that's usually the terminal emulator that I'm using. But then I open up tmux , and the behavior / colors are wrong in many CLI applications, such as emacs and htop , because tmux will set the TERM variable to screen-256color,

C-<SPC> is intercepted in emacs -nw (terminal intercept?)

╄→гoц情女王★ 提交于 2019-12-25 02:43:42
问题 I use urxvt (terminal) under awesome (window manager) and ubuntu (os). In graphical mode, c- set the mark but in text mode it inserts a space. The problem is solved when using gnome-terminal but some other key combinations still does not work. For instance, C-: insert a : in both terminals. I do not know where to look at to correct this behaviour. C-h k (help on key combination) followed by one of these combination shows only the key pressed along ctrl, for instance C- is interpreted as . As

How to create a shell script to launch 3 terminals and execute a set of commands in each?

守給你的承諾、 提交于 2019-12-24 11:35:46
问题 Currently, I open 3 terminals ('openocd session','telnet session' & 'gdb session') and execute 'a set of commands' in each terminal every time I flash my image on target. Is is possible to put this in one shell script file and run at once? (Commands on each terminal are NOT dependent on others; except that the terminals should be opened in the order mentioned above) Thanks in advance ! 回答1: Which terminal are you using? A terminal like xterm can start a program instead of a shell. Simply run

gnome 3.12 cannot be launched + locale does not help out

佐手、 提交于 2019-12-24 03:48:12
问题 I have recently installed debian "testing" jessie RC betta. I wanted to personalized system-wide the gnome-terminal by changing the custom default terminal size in the file /usr/share/vte/termcap/xterm . In fact, I just changed with gedit the the col and li numbers in the following line :co#80:it#8:li#24:\ . After I did that, I was not able to launch any more the gnome terminal 3.12.3. I got the following output: ~$ gnome-terminal (process:2879): Gtk-WARNING **: Locale not supported by C

How to clear both clipboards securely in Gnome, from Python?

佐手、 提交于 2019-12-23 12:57:42
问题 Gnome desktop has 2 clipboards, the X.org (saves every selection) and the legacy one (CTRL+C). I am writing a simple python script to clear both clipboards, securely preferably, since it may be done after copy-pasting a password. The code that I have seen over here is this: # empty X.org clipboard os.system("xclip -i /dev/null") # empty GNOME clipboard os.system("touch blank") os.system("xclip -selection clipboard blank") Unfortunately this code creates a file named blank for some reason, so

Is it possible to have python open a terminal and write to it?

烂漫一生 提交于 2019-12-23 04:00:07
问题 For example, if I have this code: subprocess.call(['gnome-terminal']) Is it possible to have python output strings to that specific terminal that was just opened? Thanks! 回答1: Possibly, but it is easier to have a custom process running in the subordinate terminal. For example, given sserv.py from the example server in the documentation the command: gnome-terminal -e "python ./sserv.py" will happily chat on port 9999 with you. Given a more complex sserv.py it could do anything you want

How do I get Ctrl-Backspace to delete a word in vim within gnome-terminal?

ε祈祈猫儿з 提交于 2019-12-20 12:34:46
问题 I'd like Ctrl-Backspace to delete the current word in vim insert mode. From within xterm I can pull this off via :inoremap <C-H> <C-W> but in gnome-terminal I cannot figure out a way to make it happen. When in vim insert mode, if I type control-v and then press backspace, I get ^H in xterm, and ^? in gnome-terminal. Unfortunately, :inoremap <C-?> <C-W> doesn't do the trick in gnome-terminal; control-backspace just erases a single character no matter what. Regarding ASCII codes: Gnome-terminal

How to change the background color of gnome-terminal?

老子叫甜甜 提交于 2019-12-18 11:27:45
问题 How to change the background color? I selected Profile > Background > solid color , but where can I select the color? 回答1: Since it seems to be Terminal you're talking about, did you disable "Use colors from system theme" under Colors? Once you do that, you can pick a background color, still under the Colors tab. The Background tab looks like it only allows selecting an image (or transparency), which tripped me up as well. 回答2: There are two well-supported ways to change the background color

how to open a gnome terminal to execute a command with gnome-terminal, constantly?

左心房为你撑大大i 提交于 2019-12-18 02:50:52
问题 I have a sh file which includes those lines: gnome-terminal\ --tab\ --title="ElasticSearch"\ --working-directory="/home/username/program/bin"\ -e "bash -c './somecommand'"\ when I run it, a gnome terminal will open and run a command for me. The problem is, when I press ctrl+c to stop the running command, the terminal closed. Is there a way to stop the running command and keep the terminal alive? Thanks in advance. 回答1: Your command works fine but the gnome-terminal closes after the

How to determine a terminal's background color?

浪尽此生 提交于 2019-12-17 18:28:12
问题 I'd like to know if there is any way to determine a terminal's background color ? In my case, using gnome-terminal. It might matter, since it's entirety up to the terminal application to draw the background of its windows, which may even be something else than a plain color. 回答1: I've came up with the following: #!/bin/sh # # Query a property from the terminal, e.g. background color. # # XTerm Operating System Commands # "ESC ] Ps;Pt ST" oldstty=$(stty -g) # What to query? # 11: text