xterm copy & paste

From: https://www.starnet.com/xwin32kb/copying-and-pasting-in-xterm/

X applications have multiple copy buffers when selecting text, two of which are PRIMARY and CLIPBOARD. FastX reads the contents of the CLIPBOARD buffer only.

  • PRIMARY
    • The “PRIMARY” selection buffer receives data when the user highlights text with the mouse. The text in this buffer is pasted when the user presses the middle mouse button in an application’s text entry field. This cut-and-paste buffer is a legacy function which new users are generally not told about, in the interests of avoiding mass confusion. Most modern applications support this buffer. This is the only buffer used by xterm.
  • CLIPBOARD
    • The “CLIPBOARD” selection buffer is used for the cut-and-paste functions that most users are familiar with: Selecting the “cut”, “copy” or “paste” menu items from the application’s “Edit” menu, or using the corresponding CTRL-X, CTRL-C, or CTRL-V shortcut keys. This selection buffer is the standard means of performing cut-and-paste operations in most modern applications. However, this selection buffer is unfortunately not used at all by xterm in the default configuration.

Because of the use of multiple buffers, text highlighted in xterm cannot be pasted into a modern application with CTRL-V (or Edit->Paste). The PRIMARY buffer is often overwritten by inadvertent highlighting before the user is ready to paste.

For example, if a user highlights a URL in an xterm, switches to Firefox, and presses ALT-D to navigate to the URL bar, then Firefox will automatically highlight the old contents of the URL bar, thus overwriting the highly volatile PRIMARY buffer before the user can paste the new URL!

How to Install mlocate (locate and updatedb Commands) on CentOS 7

http://www.liquidweb.com/kb/how-to-install-mlocate-locate-and-updatedb-commands-on-centos-7/

As root:

yum -y update
Then let’s install mlocate and any required packages:
yum -y install mlocate
The following command will update the search databases:
updatedb
mlocate installs a cron job that will run daily to update search databases at:
/etc/cron.daily/mlocate.cron