How can I use the mouse in a virtual terminal?

13,776

Yes, this is possible using the General Purpose Mouse interface (GPM Install GPM).

This package provides a daemon that captures mouse events when the system console is active, and delivers events to applications through a library.

By default, the daemon provides a 'selection' mode, so that cut-and-paste with the mouse works on the console just as it does under X.


  1. Install the package gpm Install GPM

  2. Switch to your virtual terminal

  3. Move the mouse. Be amazed by the block pointer moving around.

  4. Select a (harmless) piece text like you would in the GUI. Once you have it selected, it's on copied onto the clipboard.

  5. Hit the middle mouse button to paste.

  6. Enjoy the awesomeness!

I really like this doing it on servers when troubleshooting and you see some log files, but you need to copy & paste it to pipe it to grep for example.

enter image description here

Share:
13,776
gertvdijk
Author by

gertvdijk

FOSS enthousiast, Developer, Debian GNU/Linux (and Ubuntu) user, DevOps with Ansible/Pupppet powers, Coding in C/C++/Python. Keywords: Linux, KVM/Libvirt, Kubernetes, Ansible, Docker, Python, a bit of C/C++/Kotlin, Debian, Ubuntu, Apache, Kopano, Postfix, MySQL, PostgreSQL, Kafka, security, KDE, SSL/TLS. Every now and then I'll write an article on those topics my blog. Other sites I'm active on: Launchpad, Tweakers.net, Twitter, LinkedIn

Updated on September 18, 2022

Comments

  • gertvdijk
    gertvdijk over 1 year

    Lately I saw some of my friends using a mouse to copy & paste text around in the virtual terminal (Ctrl+Alt+F1). I was amazed that this was possible and would like to use this too.

    He wasn't sure how this was possible on his machine, but it doesn't work on my machine. How do I get this to work?

    Actually I just made up this story about a friend. I do know how this works and I answered my own question.