In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to configure mouse support for the Linux virtual console", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how to configure mouse support for the Linux virtual console" this article.
GPM, an acronym for general mouse General Purpose Mouse, is a daemon that helps you configure mouse support for the Linux virtual console. Do not confuse GPM with GDM (GNOME display Manager GNOME Display manager). The two have completely different uses.
GPM is particularly useful in the following scenarios:
New Linux server installations or systems that cannot or do not use X Windows by default, such as Arch Linux and Gentoo.
Use the copy / paste operation in the virtual terminal / console.
Use copy / paste (for example, emacs, lynx) in text-based editors and browsers.
Use copy / paste (for example, Ranger, Midnight commander) in the text file manager.
In this short tutorial, we will see how to use the mouse in a text-based terminal in a Unix-like operating system.
Install GPM
To enable mouse support in plain text Linux systems, install the GPM package. It is available in the default repository for most Linux distributions.
On Arch Linux and its variants such as Antergos, Manjaro Linux, run the following command to install GPM:
$sudo pacman-S gpm
In Debian, Ubuntu, Linux Mint:
$sudo apt install gpm
On Fedora:
$sudo dnf install gpm
On openSUSE:
$sudo zypper install gpm
After installation, use the following command to enable and start the GPM service:
$sudo systemctl enable gpm$ sudo systemctl start gpm
On Debian-based systems, the gpm service will start automatically after you install it, so you don't need to start the service manually as shown above.
Configure mouse support for the Linux virtual console
No special configuration is required. GPM will start working as soon as you install and start the gpm service.
Before installing GPM, take a look at a screenshot of my Ubuntu 18.04 LTS server:
As you can see in the screenshot above, there is no visible mouse pointer in my Ubuntu 18.04 LTS headless server. There is only a flashing cursor, which does not allow me to select text and use the mouse to copy / paste text. In an CLI-only Linux server, the mouse is useless at all.
View the following screenshot of the Ubuntu 18.04 LTS server after installing GPM:
Did you see that? I can choose words now.
To select, copy, and paste text:
To select text, press the left mouse button and drag the mouse.
After selecting the text, release the left mouse button and press the middle button to paste the text in the same or another console.
The right button is used to expand the selection, as in xterm.
If you are using a double-button mouse, use the right button to paste the text.
It's that simple!
As I have already said, GPM works well and does not require additional configuration. The following is an example of the GPM configuration file / etc/gpm.conf (or / etc/conf.d/gpm in some distributions):
# protected from evaluation (i.e. By quoting them). # # This file is used by / etc/init.d/gpm and can be modified by# "dpkg-reconfigure gpm" or by hand at your option.#device=/dev/input/miceresponsiveness=repeat_type=nonetype=exps2append=''sample_rate=
In my example, I used the USB mouse. If you are using another mouse, you may need to change the values of the device=/dev/input/mice and type=exps2 parameters.
For more details, see the man pages.
The above $man gpm is all the contents of the article "how to configure mouse support for the Linux virtual console". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.