- Gpm linux что это
- Ссылки
- Полезное
- Смотреть что такое «GPM» в других словарях:
- Gpm linux что это
- Пакет GPM-1.20.6
- Знакомимся с пакетом GPM
- Информация о пакете
- Установка пакета GPM
- Пояснение команды
- Конфигурирование пакета GPM
- Загрузочный скрипт
- Конфигурационные файлы
- Подробнее о конфигурировании
- Описание пакета
- General purpose mouse (Русский)
- Contents
- Установка
- Настройка
- QEMU или VirtualBox
- Как настроить поддержку мыши для виртуальных консолей Linux
- Установка GPM
- Настройка поддержки мыши для виртуальных консолей Linux
- gpm(8) — Linux man page
- Synopsis
- Description
- Special Commands
- Command Line Options
- Operation
Gpm linux что это
1.20.6 (February 9, 2009)
GPM (англ. general purpose mouse , «мышь общего назначения») в виртуальных консолях Linux. Включается во все дистрибутивы Linux.
GPM поддерживается ncurses и многими приложениями, включающими поддержку мыши ncurses. Поддержка GPM включена в Midnight Commander и JED.
Ссылки
- nico.schottelius.org/software/gpm/ — официальный сайт GPM
- gpm(8) — страница справки man по администрации и привилегированным командам GNU/Linux (англ.)
Wikimedia Foundation . 2010 .
Полезное
Смотреть что такое «GPM» в других словарях:
GPM — can mean:*GPM (software) (General Purpose Mouse), a mouse server for the console and xterm *Gallons per minute, a unit of volumetric flow rate *General purpose macro processor, an type of macro processor *Geopotential meter, a unit of… … Wikipedia
GPM — steht für: Gallonen pro Minute, einer Einheit für Durchflusswerte Deutsche Gesellschaft für Projektmanagement Gepanzerte Pioniermaschine Geschäftsprozessmanagement Geschäftsprozessmodellierung Greenpeace Magazin gpm steht für: geopotentieller… … Deutsch Wikipedia
gpm — gpm, Einheitenzeichen für geopotenzielles Meter … Universal-Lexikon
gpm — abbrev. gallons per minute … English World dictionary
GPM — Cette page d’homonymie répertorie les différents sujets et articles partageant un même nom. Sigles d’une seule lettre Sigles de deux lettres > Sigles de trois lettres Sigles de quatre lettres … Wikipédia en Français
GPM — graduated payment mortgage (GPM) A mortgage in which the monthly payment of principal and interest begins at a low amount and progressively increases to a predetermined higher amount. Thereafter, the amount of the monthly payment remains constant … Financial and business terms
GPM — abbreviation 1. often not capitalized gallons per minute 2. geopotential meter * * * gallons per minute. Also, GPM, g.p.m. * * * g.p.m., gallons per minute. GPM (no periods), graduated payment mortgage. G.P.M., Grand Past Master. * * * abbr.… … Useful english dictionary
gpm — gallons per minute. Also, GPM, g.p.m. * * * … Universalium
gpm — or GPM or g.p.m. wam gallons per minute … From formal English to slang
GPM — Global Priority Mail (GPM) An expedited international service for the shipment of documents, correspondence, and merchandise, featuring a 4 business day delivery standard to selected countries in Europe, the Pacific Rim, and Canada … Glossary of postal terms
Источник
Gpm linux что это
Библиотека сайта rus-linux.net
На главную -> MyLDP -> Электронные книги по ОС Linux
Beyond Linux From Scratch. Version 2011-12-30 | ||
Назад | 11. Системные утилиты | Вперед |
Пакет GPM-1.20.6
Знакомимся с пакетом GPM
В пакете GPM (демон мыши общего назначения General Purpose Mouse) находится сервер мыши для консоли и для xterm. С его помощью не только поддерживаются обычные операции cut and paste (вырезать и вставить); его библиотека компонент используется различными программами, например, Links, для поддержки работы с мышью. Пакет полезен в настольных системах, в особенности, если следуете инструкциям проекта (Beyond) Linux From Scratch; часто гораздо проще (и с меньшим числом ошибок) вырезать текст из одного консольного окна и вставить его в другое, чем вводить все вручную!
Известно, что пакет правильно собирается и работает на платформе LFS-6.5.
Информация о пакете
- Загрузка (HTTP): http://www.nico.schottelius.org/software/gpm/archives/gpm-1.20.6.tar.bz2
- Контрольная сумма MD5: 6b534da16dc1b28ba828dea89e520f6f
- Размер загружаемого пакета: 1,4 MB
- Оценочный размер требуемого дискового пространства: 9 MB
- Оценочное время сборки: 0,1 SBU
Установка пакета GPM
Установите пакет GPM с помощью следующих команд:
Теперь в роли пользователя root выполните:
Пояснение команды
install-info . : Этот пакет устанавливает файл .info , но не обновляет системный файл dir . Эта команда выполняет обновление.
ln -v -s libgpm.so.2.1.0 /usr/lib/libgpm.so: Эта команда используется для создания символической ссылки .so на библиотеку.
Конфигурирование пакета GPM
Загрузочный скрипт
Установите установочный скрипт /etc/rc.d/init.d/gpm , который входит в состав пакета blfs-bootscripts-20100825 .
Конфигурационные файлы
/.gpm-root : Используемые по умолчанию и индивидуальные конфигурационные файлы обработчика gpm-root.
/etc/sysconfig/mouse : В этом файле хранится имя вашего устройства мыши и используемый протокол. Чтобы создать этот файл, выполните в роли пользователя root следующие команды:
Подробнее о конфигурировании
Примеры значений, устанавливаемых для переменных окружения MDEVICE , PROTOCOL и GPMOPTS :
Узнать список протоколов можно с помощью запуска команды gpm -m [устройство] -t -help. Настройка переменной MDEVICE зависит от типа мыши, которая у вас есть. Например, /dev/ttyS0 — для мыши, подключаемой к последовательному порту (на Windows это — COM1), /dev/input/mice часто используется для мыши, подключаемой к USB, а /dev/psaux — для PS2 мышей. Переменная GPMOPTS используется для всех дополнительных параметров, которые необходимо использовать с вашими устройствами.
Описание пакета
Установленные программы: disable-paste, display-buttons, display-coords, get-versions, gpm, gpm-root, hltest, mev и mouse-test
Установленные библиотеки: libgpm.
Установленные директории: /usr/share/doc/gpm-1.20.6
механизм обеспечения безопасности, используемый для отключения буфера обмена данными
это простая программа, которая сообщает, нажаты или отпущены кнопки мыши
это простая программа, которая сообщает координаты мыши
используется для информирования о версиях библиотеки и сервера GPM
утилита, осуществляющая операции вырезания и вставки, а также являющаяся сервером мыши виртуальных консолей
является обработчиком, используемым по умолчанию gpm . Используется для отображения меню в корневом окне.
это простое приложение-пример, использующие высокоуровневую библиотеку; предназначено для изучения программистами, которые хотят использовать высокоуровневую библиотеку
это программа, сообщающая о событиях, связанных с мышью
инструментальное средство для определения типа мыши и устройства, к которому мышь подключена
содержит функции API для доступа к демону GPM
Перевод сделан с варианта оригинала, датированного 2010-04-21 19:10:06 +0000
Источник
General purpose mouse (Русский)
GPM (General Purpose Mouse) — демон, позволяющий использовать мышь в виртуальных терминалах Linux.
Contents
Установка
Установите пакет gpm . Для поддержки тачпада на ноутбуке вам, вероятно, понадобится дополнительно установить xf86-input-synaptics .
Настройка
С помощью опции -m определяется файл устройства мыши. Опция -t используется для указания типа мыши. Чтобы отобразить список возможных вариантов для опции -t , запустите gpm с параметром -t help :
Для запуска демона gpm необходимо указать некоторые опции. Их можно прописать в файле /etc/conf.d/gpm , или использовать при прямом запуске gpm. С 2016 года файл gpm.service для systemd содержит опции для USB-мышей.
Конечно, это нужно изменить (желательно как принято в systemd), если используется другой тип мыши и gpm запускается как systemd-служба.
- Для PS/2 мышей опции такие:
- И трекпоинта IBM:
После настройки запустите и включите службу gpm.service .
Более подробную информацию вы можете получить на странице справочного руководства gpm (8) .
QEMU или VirtualBox
Со стандартной мышью, которую эмулируют QEMU и VirtualBox, есть некоторые проблемы и в gpm, и в X при позиционировании и кликах. Положение курсора не синхронизировано с хостом, так что в виртуальном экране есть области, в которые трудно попасть. Клики срабатывают не там, где отображается курсор.
И QEMU, и VirtualBox позволяют решить эту проблему с помощью эмуляции USB-планшета, который имеет абсолютное позиционирование. ( libvirt использует это автоматически.)
Однако gpm умеет использовать виртуальную мышь только в относительном режиме, поэтому проблемы остаются. Использование других типов мышей в опции -t тоже не помогает.
Пакет gpm-vm AUR включает в себя старый пулл-реквест, добавляющий поддержку USB-планшетов для VirtualBox (в QEMU тоже работает) и прописывает его использование по умолчанию в gpm.service .
Вам может понадобиться изменить используемое event-устройство (стандартный -m /dev/input/mice не сработает). По умолчанию:
Вы можете определить нужный event, установив evtest и выполнив:
Источник
Как настроить поддержку мыши для виртуальных консолей Linux
Я использую Oracle VirtualBox для тестирования различных Unix-подобных операционных систем.
Большинство моих виртуальных машин – это серверы, которые не имеют графической среды рабочего стола.
В течение долгого времени мне было интересно, как мы можем использовать мышь в текстовых терминалах на Linux-серверах.
Благодаря GPM, сегодня я узнал, что мы можем использовать мышь в виртуальных консолях для операций копирования и вставки.
GPM, аббревиатура для General Purpose Mouse, является демоном, который помогает вам настраивать поддержку мыши для виртуальных консолей Linux.
Пожалуйста, не путайте GPM с GDM (диспетчер отображения GNOME).
Оба служат для совершенно разных целей.
GPM особенно полезен в следующих случаях:
- Linux-сервера, которые по умолчанию не могут или не используют систему X-окон, например Arch Linux и Gentoo.
- Использование операций copy / paste в виртуальных терминалах / консолях.
- Использование copy / paste в текстовых редакторах и браузерах (например, emacs, lynx).
- Использование copy / paste в менеджерах текстовых файлов (например, Ranger, Midnight commander).
В этом кратком руководстве мы рассмотрим, как использовать мышь в текстовых терминалах в Unix-подобных операционных системах.
Установка GPM
Чтобы включить поддержку мыши в текстовых системах Linux, установите пакет GPM.
Он доступен в репозиториях по умолчанию для большинства дистрибутивов Linux.
В Arch Linux и его вариантах, таких как Antergos, Manjaro Linux, выполните следующую команду для установки GPM:
На Debian, Ubuntu, Linux Mint:
После установки включите и запустите службу GPM, используя следующие команды:
В системах на базе Debian служба gpm автоматически запускается после ее установки, поэтому вам не нужно вручную запускать службу, как показано выше.
Настройка поддержки мыши для виртуальных консолей Linux
Специальной конфигурации не требуется.
GPM начнет работать, как только вы его установили, и запустите службу gpm.
Посмотрите на следующий снимок экрана моего сервера Ubuntu 18.04 LTS перед установкой GPM:
Как видно из приведенного выше скриншота, на моем Ubuntu 18.04 LTS-сервере нет видимого указателя мыши.
Только мигающий курсор, и он не позволит мне выбрать текст, скопировать / вставить текст с помощью мыши.
В серверах Linux, ориентированных только на CLI, мышь буквально не приносит пользы.
Теперь проверьте следующий снимок экрана сервера Ubuntu 18.04 LTS после установки GPM:
Чтобы выбрать, скопировать и вставить текст, выполните следующие действия:
Чтобы выбрать текст, нажмите левую кнопку мыши и перетащите мышь.
После того, как вы выбрали текст, отпустите левую кнопку мыши и вставьте текст в ту же самую или другую консоль, нажав среднюю кнопку мыши.
Правая кнопка используется для расширения выделения, например, в `xterm ‘.
Если вы используете двухкнопочную мышь, используйте правую кнопку для вставки текста.
Как я уже сказал, GPM работает отлично, и нет необходимости в дополнительной настройке.
Вот пример содержимого конфигурационного файла GPM /etc/gpm.conf (или /etc/conf.d/gpm в некоторых дистрибутивах):
В моем примере я использую USB-мышь.
Если вы используете другую мышь, вам может потребоваться изменить значения параметров device = / dev / input / mice и type = exps2.
Для получения дополнительной информации см. Справочные страницы.
Источник
gpm(8) — Linux man page
gpm — a cut and paste utility and mouse server for virtual consoles
Synopsis
Description
This package tries to be a useful mouse server for applications running on the Linux console. It is based on the «selection» package, and some of its code comes from selection itself. This package is intended as a replacement for «selection» as a cut-and-paste mechanism; it also provides additional facilities. The «selection» package offered the first cut-and-paste implementation for Linux using two mouse buttons, and the cut buffer is still called «selection buffer» or just «selection» throughout this document. The information below is extracted from the texinfo file, which is the preferred source of information.
The gpm executable is meant to act like a daemon (thus, gpmd would be a better name for it). This section is meant to describe the command-line options for gpm, while its internals are outlined in the next section.
Due to restrictions in the ioctl(TIOCLINUX) system call, gpm must be run by the superuser. The restrictions have been added in the last 1.1 kernels to fix a security hole related to selection and screen dumping.
The server can be configured to match the user’s taste, and any application using the mouse will inherit the server’s attitude. From release 1.02 up to 1.19.2 is was possible for any user logged on the system console to change the mouse feeling using the -q option. This is no longer possible for security reasons.
As of 0.97 the server program puts itself in the background. To kill gpm you can just reinvoke it with the -k cmdline switch, although killall gpm can be a better choice.
Special Commands
Version 1.10 adds the capability to execute special commands on certain circumstances. Special commands default to rebooting and halting the system, but the user can specify his/her personal choice. The capability to invoke commands using the mouse is a handy one for programmers, because it allows to issue a clean shutdown when the keyboard is locked and no network is available to restore the system to a sane state.
Special commands are toggled by triple-clicking the left and right button — an unlikely event during normal mouse usage. The easiest way to triple-click is pressing one of the buttons and triple-click the other one. When special processing is toggled, a message appears on the console (and the speaker beeps twice, if you have a speaker); if the user releases all the buttons and presses one of them again within three seconds, then the special command corresponding to the button is executed.
The default special commands are: left button Reboot the system by signalling the init process middle button (if any) Execute /sbin/shutdown -h now right button Execute /sbin/shutdown -r now The -S command line switch enables special command processing and allows to change the three special commands. To accept the default commands use -S «» (i.e., specify an empty argument). To specify your own commands, use a colon-separated list to specify commands associated to the left, middle and right button. If any of the commands is empty, it is interpreted as ‘send a signal to the init process’. This particular operation is supported, in addition to executing external commands, because sometimes bad bugs put the system to the impossibility to fork; in these rare case the programmer should be able to shutdown the system anyways, and killing init from a running process is the only way to do it.
As an example, -S «:telinit 1:/sbin/halt», associates killing init to the left button, going single user to the middle one, and halting the system to the right button.
System administrators should obviously be careful about special commands, as gpm runs with superuser permissions. Special commands are best suited for computers whose mouse can be physically accessed only by trusted people.
Command Line Options
Available command line options are the following: -a accel Set the acceleration value used when a single motion event is longer than delta (see -d). -A[limit] Start up with selection pasting disabled. This is intended as a security measure; a plausible attack on a system seems to be to stuff a nasty shell command into the selection buffer (rm -rf /) including the terminating line break, then all the victim has to do is click the middle mouse button .. As of version 1.17.2, this has developed into a more general aging mechanism; the gpm daemon can disable (age) selection pasting automatically after a period of inactivity. To enable this mode just give the optional limit parameter (no space in between !) which is interpreted as the time in seconds for which a selection is considered valid and pastable. As of version 1.15.7, a trivial program called disable-paste is provided. The following makes a good addition to /etc/profile if you allow multiple users to work on your console. case $( /usr/bin/tty ) in
/dev/tty1*) /usr/bin/disable-paste ;;
esac -b baud Set the baud rate. -B sequence Set the button sequence. 123 is the normal sequence, 321 can be used by left-handed people, and 132 can be useful with two-button mice (especially within Emacs). All the button permutations are allowable. -d delta Set the delta value. When a single motion event is longer than delta, accel is used as a multiplying factor. (Must be 2 or above) -D
Do not automatically enter background operation when started, and log messages to the standard error stream, not the syslog mechanism. This is useful for debugging; in previous releases it was done with a compile-time option. -g number With glidepoint devices, emulate the specified button with tapping. number must be 1, 2, or 3, and refers to the button number before the -B button remapping is performed. This option applies to the mman and ps2 decoding. No button is emulated by default because the ps2 tapping is incompatible with some normal ps2 mice -h
Print a summary of command line options. -i interval Set interval to be used as an upper time limit for multiple clicks. If the interval between button-up and button-down events is less than limit, the press is considered a double or triple click. Time is in milliseconds. -k
Kill a running gpm. This can be used by busmouse users to kill gpm before running X (unless they use -R or the single-open limitation is removed from the kernel). -l charset Choose the inword() look up table. The charset argument is a list of characters. — is used to specify a range and \ is used to escape the next character or to provide octal codes. Only visible character can appear in charset because control characters can’t appear in text-mode video memory, whence selection is cut. -m filename Choose the mouse file to open. Must be before -t and -o. -M
Enable multiple mode. The daemon will read two different mouse devices. Any subsequent option will refer to the second device, while any preceding option will be used for the first device. This option automatically forces the repeater (-R) option on. -o list-of-extra-options The option works similary to the »-o» option of mount; it is used to specify a list of »extra options» that are specific to each mouse type. The list is comma-separated. The options dtr, rts or both are used by the serial initialization to toggle the modem lines like, compatibly with earlier gpm versions; note however that using -o dtr associated with non-plain-serial mouse types may now generate an error. And by the way, use -o after -m and after -t. -p
Forces the pointer to be visible while selecting. This is the behaviour of selection-1.7, but it is sometimes confusing. The default is not to show the pointer, which can be confusing as well. -r number Set the responsiveness. A higher responsiveness is used for a faster cursor motion. -R[name] Causes gpm to act as a repeater: any mouse data received while in graphic mode will be produced on the fifo /dev/gpmdata in protocol name, given as an optional argument (no space in between !). In principle, you can use the same names as for the -t option, although repeating into some protocols may not be implemented for a while. In addition, you can specify raw as the name, to repeat the mouse data byte by byte, without any protocol translation. If name is omitted, it defaults to msc. Using gpm in repeater mode, you can configure the X server to use its fifo as a mouse device. This option is useful for bus-mouse owners to override the single-open limitation. It is also an easy way to manage those stupid dual-mode mice which force you to keep the middle button down while changing video mode. The option is forced on by the -M option. -s number Set the sample rate for the mouse device. -S commands Enable special-command processing, and optionally specify custom commands as a colon-separated list. See above for a detailed description of special commands. -t name Set the mouse type. Use -t help to get a list of allowable types. Since version 1.18.1, the list also shows which protocols are available as repeaters (see -R above), by marking them with an asterisk (»*»).
Use -t after you selected the mouse device with -m. -v
Print version information and exit.
Force two buttons. This means that the middle button, if any, will be taken as it was the right one.
Force three buttons. By default the mouse is considered to be a 2-buttons one, until the middle button is pressed. If three buttons are there, the right one is used to extend the selection, and the middle one is used to paste it. Beware: if you use the -3 option with a 2-buttons mouse, you won’t be able to paste the selection.
Operation
To select text press the left mouse button and drag the mouse. To paste text in the same or another console, press the middle button. The right button is used to extend the selection, like in ‘xterm’.
Two-button mice use the right button to paste text.
Double and triple clicks select whole word and whole lines. Use of the ‘-p’ option is recommended for best visual feedback.
If a trailing space after the contents of a line is highlighted, and if there is no other text on the remainder of the line, the rest of the line will be selected automatically. If a number of lines are selected, highlighted trailing spaces on each line will be removed from the selection buffer.
Any output on the virtual console holding the selection will clear the highlighted selection from the screen, to maintain integrity of the display, although the contents of the paste buffer will be unaffected.
The selection mechanism is disabled if the controlling virtual console is placed in graphics mode, for example when running X11, and is re-enabled when text mode is resumed. (But see BUGS section below.)
The gpm server may have problems interacting with X: if your mouse is a single-open device (i.e. a bus mouse), you should kill gpm before starting X, or use the -R option (see above). To kill gpm just invoke gpm -k. This problem doesn’t apply to serial mice.
Two instances of gpm can’t run on the same system. If you have two mice use the -M option (see above).
While the current console is in graphic mode, gpm sleeps until text mode is back (unless -R is used). Thus, it won’t reply to clients. Anyways, it is unlikely that mouse-eager clients will spur out in hidden consoles.
The clients shipped out with gpm are not updated, thus there are potential security risks when using them.
Источник