gnome-terminal

X11: get list of all gnome-terminal windows on my display?

I have two xterms and several gnome-terminal windows active on my X display. However, xlsclients only shows one gnome-terminal client. $ xlsclients luban.local /usr/X11/bin/xterm ohm gnome-terminal luban.local xterm How can I get a list of the gnome-terminal sessions attached to my display? ...

gnome-terminal: how to eliminate the scrollbar programatically?

I'm spawning some processes running in their own gnome-terminal and don't want to show the scrollbar. Is there something like xterm +sb to turn the scrollbar off for that particular window? ...

Fix Home and End

I'm using vim in gnome-terminal (2.26.0): although I use 95% of the time "$" to navigate to the EOL and "0" for the opposite, every now and then I hit "Home" or "End". When I use Home, the text I have in the current line is moved on line down, leaving me in insert mode in the current line and the letter H appears at the beginning of the...

gnome-terminal title says hostname

Is there a way to allow the gnome-terminals to show the current host name in its title. So if I shh to another system, id like the host name to change. Thank you. ...

gnome-terminal, virtualenv and a bunch of services

Hi folks I'm working on a server-side project that consists of several services. Each service is run in interactive (i.e. non-daemon) mode, this is handy while active development. The project is in virtualenv. So the typical way to start a service is: $ cd ~/to/vitualenv/subdir/where/service/code/located $ source ../path/to/virtualenv/...

See GNOME Terminal output in virtual console

I've got a program running in a GNOME Terminal, but the screensaver is acting up and won't let me back in with my password. While waiting for a fix for the gnome-screensaver bug, is there some way to see the output (or even take over the process) in a virtual console (Ctrl-Alt-F1) without being able to interact with the GNOME Terminal? ...

How to display tabs as 4 spaces in gnome-terminal

Actually gnome-terminal display tabs as 8 spaces, and this is very annoying when you cat files or view diffs, is there some way to change this permanently? ...

how to overwrite default system key mapping in vim

I want to map f1 to create a new tab so I add the following line map <F1> :tabnew <CR> into my .vimrc and save it . But when I hit f1 in vim the GNOME TERMINAL MANNUAL window pops up rather than a new tab being created . So what should I do in this situation ? ...

How to check which program runs inside gnome-terminal

I want to write a program which prints the current focused window name and if it is a gnome-terminal, then prints out the running program inside the current gnome-terminal tab (for example vim, if a vim session is running). To get the currently focused window name, I used: xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" ...

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

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 ...

Mini Project: Change the color of the terminal based on the time of day

Good Evening, I am pretty new to Unix so maybe this mini project is too ambitious. Hoping someone could point in in the right direction. Working in a cubicle and I can't see how light it is outside. In general I use a yellow terminal in the morning (sunny) and a black/green past 3:00 (night). What I would like to do (partly just...

How to launch gnome-terminal from command line and duplicate environment variables?

Hi All, Is there a way to launch a gnome-terminal from the command line (i.e., using the /usr/bin/gnome-terminal command) and have the new terminal inherit the environment variables and other set variables of terminal from which the command was run? The scenario is thus: Open a terminal Set some variables Set some environment variabl...

Is there a way to determine a terminal's background color?

Hello folks. (not sure if this question belongs here or to superuser) 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 plai...

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

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, ...

something similar to Emacs shell?

Hey guys, I'm looking for something similar to Emacs shell. I want to be able to select text easily in my terminal, be able to manipulate the output. Unfortunately, emacs is not always an option. I can't figure out how to make a few things (e.g autocompletion) work the way it does in gnome-terminal and it is a bit of a pain on remote ...

How do I open gnome-terminal with new enviroment variables?

I have a file that sets enviroment variables(JAVA_HOME, ANT_HOME...) I use for doing java programming related tasks. WHen I want to setup the new environment I type "source devenv" (devenv being the file that contains the new environment setup). I'm trying to create a shortcut that opens the gnome-terminal and automatically sets those va...

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

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! ...

Configure gnome-terminal so that right click extends selection rather than displays menu

I've been using Linux for a long time, but have only recently 'upgraded' to a full GUI desktop since using it command-line-only for the last three or four years. I used to use 'aterm' before then (with fluxbox, and other old-school things) but I see now that gnome-terminal is pretty usable in Ubuntu's Gnome. However, there's one thing t...

Context aware switching of character encoding in terminals

When working on projects that use different character encodings I find myself constantly switching the character encoding of a terminal. In some terminals (e.g. gnome-terminal) you can create profiles for different terminals (say, profile "Project A" for the project that uses UTF-8 and profile "Project B" for the one that uses ISO-8859-1...

Is it possible to enable ERASE while in non-canonical mode?

The question is pretty much in the title. I need to have my terminal in non-canonical mode for some input I am getting from the user (I need to have Ctrl-D act as an immediate "finished" signal, rather than flushing the input when pressed and only EOF-ing when there is no input to flush.), but this makes it impossible to ERASE. I am not ...