xterm interview questions
Top xterm frequently asked interview questions
I want to terminate an instance of GNU screen
whilst preserving the process running inside it.
So I opened my regular terminal emulator program and executed screen. Then I used that instance of screen
to execute ./script_x.sh
. Now, for whatever reason, I want to quit using screen
however script_x.sh
hasn't yet completed its task and I'm not willing to forfeit my progress.
Can I keep the active process alive so as to continue working on it inside my regular terminal emulator?
Source: (StackOverflow)
The usual vim yank
and paste
works only in the same window (but does work across files and close/save commands). Is it possible to make it work across terminals (yank from window in one terminal and paste in another) and if so, how?
Source: (StackOverflow)
I would like to change the colors (background, font, foreground) of my xterm from the commandline. I've heard that this can be done using ANSI escape sequences.
If this is possible:
- How is it done?
- Can I use color names or must I use their RGB codes?
Source: (StackOverflow)
How could I scroll up and down the bash shell window (without the mouse or scroll bars, just using the keyboard)?
Shift+PageUp and Shift+PageDown acts like page up and page down.
But how could one scroll just one line up or down?
Shift+Up and Shift+Down doesn't work.
Source: (StackOverflow)
I would like to clear my terminal upon hitting submitting an empty command. In other words, I would like to call clear
when I hit Enter on empty line. Is that possible?
I understand that is not how the terminal works, but there might be a nice hack such as binding the Enter key and checking terminal or something.
Source: (StackOverflow)
If I copy text into the xterm clipboard from vim, it is cleared when I exit vim.
How do I prevent this?
Source: (StackOverflow)
What's the difference between Terminal in Ubuntu desktop (Applications>Accessories>Terminal) and xterm? They look very similar.
Source: (StackOverflow)
I would like to setup the prompt colors in .bashrc
depending on the colors it is using for foreground and background.
For example, blue prompt if background is light and beige if it is dark.
Is there a way to find out the current settings in a script?
Source: (StackOverflow)
I am using Mac OS X 10.8 and XQuartz 2.7.2. I have downloaded and placed several TrueType fonts named *.ttf
in my /Users/<name>/.fonts
directory. Upon running XQuartz several files including fonts.dir
are created. This file has X11 font names of various encodings, etc. for each font I've installed.
My trouble is that I can't always "figure out" the correct name to use in xterm -fa <NAME>
or in my .Xresources XTerm*faceName
entry. For some fonts the core font name as listed in the detailed X11 font name in the fonts.dir
file works whereas for others it doesn't.
Source: (StackOverflow)
I checked out latest vim7 from cvs repository.
cvs -z3 -d:pserver:anonymous@vim.cvs.sf.net:/cvsroot/vim checkout vim7
I tried:
./configure --enable-xterm_clipboard
but I got -
WARNING: unrecognized options --enable-xterm_clipboard
I tried:
./configure --with-x
but I got -
configure: error: unrecognized option: --with_x
.
Can someone please tell me the correct way to configure with xterm_clipboard support?
Edit
I tried ./configure --with-feature=normal --with-x --with-gui
in the src
directory, but got WARNING: unrecognized options --with-feature, --with-gui
at the end.
Source: (StackOverflow)
I'm using a Ubuntu (11.04 Server Edition) virtual machine as my development environment. It doesn't have a desktop environment since I don't think its necessary and I want to keep it lightweight. I'm accessing it via SSH with PuTTY on Windows 7. I grew fond of Emacs 24 as an IDE but still want to use inside a terminal.
I successfully enabled the 256 color version of xterm to render Emacs 24 themes properly, however the terminal doesn't render comments in italics and classes/functions/methods underlined as it is declared on the theme code. I noticed that the bold font style works after enabling it in PuTTY.
I tried changing the Terminal-Type string in PuTTY to rxvt-unicode with no avail. I also tried other terminal emulators like SecureCRT and forks like PuTTYcyg and KiTTY since I noticed Putty doesn't display fonts in italics as a general font setting.
I also tried Vim and other systems with all this options and configurations and it didn't work.
Is there a way to achieve this? How?
Source: (StackOverflow)
I've suffered this problem many times and so do my colleagues
Sometimes after you stroked some keyboard and mouse combinations this behavior showed up : you have to click a xterm's title bar to focus on that term so that you can input, instead of any place in that window.
Whatever you do, minimize, resize don't help. This only thing you can do is logout of that session but all the working history will be gone(of course I can save that but it's awkward)
I'm eagerly wondering is there any solutions to this? I use ctrix XenApp plugin 11.0. The other platform info:
Linux 2.6.9-67.ELsmp x86_64
OS: RedHat Enterprise Linux 4.0 U6
xterm:X.Org 6.8.2(192)
Thanks!
Source: (StackOverflow)
That's what I have in my .bashrc
if [ -n "$DISPLAY" -a "$TERM" == "xterm" ]; then
export TERM=xterm-256color
fi
In my .vimrc I have:
set t_Co=256
echo $TERM prints xterm-256color
tput colors prints 256
I've also runned a script called 256colors2.pl and all colors are printed correctly. Still what I see in my terminal is this (that's the "desert" theme):

Also the colortest.vim file does not display properly:

Apparently it only shows the default color palette of my terminal.
Source: (StackOverflow)