gnome-terminal interview questions
Top gnome-terminal frequently asked interview questions
I am using:
user@unknown:~$ sudo command -option > log
to save the results of "command" to the file "log", but I'd like to also get the result on the terminal, is this possible?
I am using ubuntu 10.04 lts.
Source: (StackOverflow)
I would like to replace GVim with Vim in the terminal. One of the nice things about GVim is that it is able to display text using italics.
Vim allows setting an ANSI escape code for italics (\e[3m
), but this does not work in Gnome Terminal. Is there a terminal emulator that supports the ANSI escape code for italics?
Source: (StackOverflow)
I know there are options to start a new terminal with a specified title, and that is is possible to change the title from a terminal using the menu: 'Terminal' -> Set Title.
However, I want to change it for a current terminal from command line. How can I change the title for an existing Gnome terminal from command line?
Source: (StackOverflow)
I am trying to write a command that will launch a few terminal tabs, execute something in each tab, and have each tab stay open after the command in finished, so I can look at the output and type more commands in each tab
something like this:
gnome-terminal --tab -e "ls -a" --tab -e "ls"
but the problem with this is that the tabs close as soon as the "ls" commands finish. Does anyone know how to make the tabs stay open?
Source: (StackOverflow)
After upgrading to Ubuntu 11.04, my terminals (gnome-terminal and urxvt) start in "/"
instead of "~"
What can cause this behavior?
I imagine that the working directory of Gnome or X is set to "/"
, or something like that, but I have no idea on where to start debugging this.
I use zsh, config can be included.
Source: (StackOverflow)
When I paste a command to my OS X or Ubuntu bash prompt using CmdV, the command is not in history – even if it is executed. The command is in history only if I type it.
How to enable that pasted commands get into bash's history?
Source: (StackOverflow)
I often have several files open in vim, each in a different tab. I have to remember which tab has which file open. Is there a way to show this in the tab titles?
Source: (StackOverflow)
In gnome-terminal, I can just press Alt + (1, 2, 3, etc.) to switch to specific tabs. I can also use Ctrl + (PgUp / PgDn) to cycle through tabs (admittedly less convenient, but it can be remapped).
If I want to use vim tabs instead of gnome-terminal tabs, typing :tabn
and :tabp
is quite cumbersome. I could map them to keyboard shortcuts, but that is still a lot less convenient than jumping directly to tab 4 with Alt + 4.
Is there a faster way to switch between tabs in vim?
Source: (StackOverflow)
When I connect via ssh to certain servers, it timeouts and "freezes" the terminal (doesn't accept input, doesn't disconnect, can't Ctrl-C to kill the ssh process or anything).
This is in Ubuntu's gnome-terminal
though it seems to be pausing the terminal input/output, and doesn't affect the operation of the GNOME Terminal software itself. So less a bug with gnome-terminal
than an annoying inconsistency with ssh.
So, is there a way to prevent/regain the terminal from ssh connections that have timed out?
Source: (StackOverflow)
I'd like to have my terminal background color change based on hostname. My reasoning for this is mainly to have and extra way to remind myself what server I am on, so I don't do something stupid.
Is there someway I can have it use the standard aubergine background if I am on my local machine, then change red if I ssh into a production web server, or other hosts that I could specify?
Source: (StackOverflow)
Switching to and from insert mode in Vim is no longer instantaneous since I use tmux. After pressing Esc in insert mode, it takes a noticeable amount of time to actually get out of insert mode. After pressing Esc and any other key afterwards the switch is immediate, and the command for the key pressed after Esc is executed. Any idea what might cause this?
The Vim configuration is not the problem as the delay does not occur when I run Vim outside tmux, so this is probably related to tmux somehow. I use gnome-terminal btw.
Also worth noting, it seems I can not define key bindings in tmux for Esc, my plan was to bind Esc to:
bind Escape send-keys ^[
Alas, it seems binding anything to Esc for tmux does not work. The same problem occurs in screen as well.
Source: (StackOverflow)
When entering a command which spans multiple lines in Bash, how do I edit previous lines? I'm a Linux Mint (Lisa) user using GNOME Terminal.
For example, let's say I type:
$ echo "foo bar
> baz
>
And then when I'm about to type the third line of the command, suddenly realize I want "foo" and "bar" to be on separate lines. How would I reposition my cursor between "foo" and "bar" such that I could press enter and put them on separate lines?
(It's not easy like you might think. Up arrow doesn't work, neither does Ctrl-P. So please, try it out before posting! Thanks!)
Source: (StackOverflow)
I often use Ubuntu's GNOME Terminal to connect to an external server using ssh. When rebooting the server the Terminal shows this message:
# reboot
Broadcast message from root (pts/0) (Wed Sep 29 13:52:26 2010):
The system is going down for reboot NOW!
#
And a seconds later the Terminal no longer responds to keystrokes, CTRL-c, CTRL-d, etc... The only escape seems to be closing the Terminal window from the GUI.
Does anyone know of a more elegant way to break out of ssh after a remote server reboot?
Source: (StackOverflow)
i'm used to using putty on a window's machine. With putty whatever you select is automatically on the clipboard without having to right click and select copy. And right click just pastes.
Source: (StackOverflow)