注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

On screen annotation

From Funtoo
Revision as of 09:40, January 31, 2017 by Dan-erik (talk | contribs) (Dan-erik moved page On screen annotation to HOWTO:How to draw on the desktop)
Jump to navigation Jump to search

Write on top of apps on your screen

There are many occasions where you might want to draw something on your screen. Most commonly, during a presentation. LibreOffice Impress, and other presentation software, has a pen built into the presenter mode which enables you to draw on slides. But what if you want to show a programming example, and you want to draw on the terminal, or on the IDE to highlight something? There are a few options available to do this.
   Support Funtoo!
Get an awesome Funtoo container and support Funtoo! See Funtoo Containers for more information.

Compiz

The "Compiz" compositor has on screen annotation built in. You can enable it in the options, and set up shortcuts for clearing the screen etc.

Gromit

Gromit is available for installation from the Funtoo repositories.

   emerge gromit

After installing it, you need to change the settings in the .gromitrc settings file:

   nano ~/.gromitrc

Here are some example contents of settings:

   "red Pen" = PEN (size=7 color="red");
   "blue Pen" = "blue Arrow" (arrowsize=2);
   "yellow Pen" = "red Pen" (color="yellow");
   "Eraser" = ERASER (size = 95);
   
   "Core Pointer" = "red Pen";
   "Core Pointer"[SHIFT] = "blue Pen";
   "Core Pointer"[CONTROL] = "yellow Pen";
   "Core Pointer"[2] = "Eraser";

Gromit has not been updated for a very long time. The latest version is 20041223-rc1. It can be extremely slow and because of how slow it is to draw there are cases where it becomes impossible to use for anything else than putting a point on the screen.

To start drawing on the screen, you press the Pause button (usually located close to the numeric keyboard). Quitting Gromit is done with Alt-Pause, and you can hide the painting and bring it back by pressing Ctrl-Pause. Clearing the annotations for the entire screen is done with Shift-Pause.

Gromit-MPX

There is a development of Gromit called Gromit-MPX, which is currently under active development. This is much faster than the original Gromit because it uses the XCOMPOSITE extension if it is available (e.g. if you are using Compton with Openbox). Therefore, this is a much preferable alternative for those who want to draw on the screen in a light weight installation such as LXQt. Gromit-MPX uses GTK3 to create a panel applet that can be used for controlling its behaviour.

   emerge gromit-mpx

To draw on the screen in Gromit-MPX you would by default press F9, otherwise the same as Gromit.

Gromit-MPX also has an option to change the opacity of the drawing layer:

   gromit-mpx -o <opacity>

Configuration of Gromit-MPX is similar to Gromit, but the file is in ~/.config/gromit-mpx.cfg so it is not hidden. Here is an example configuration file:

   "red Pen" = PEN (size=5 color="red");				
   "blue Pen" = "red Pen" (color="blue");				
   "yellow Pen" = "red Pen" (color="yellow");			
   "green Marker" = PEN (size=6 color="green" arrowsize=1);		
   
   "Eraser" = ERASER (size = 75);					
   
   "default" = "red Pen";						
   "default"[SHIFT] = "blue Pen";					
   "default"[CONTROL] = "yellow Pen";				
   "default"[2] = "green Marker";					
   "default"[Button3] = "Eraser";	

As you can see, using [2] or [Button2] accomplishes the same thing; it controls the behavior of mouse button 2. You can use up to mouse button 5. The colors can be anything in rgb.txt or you can specify rgb yourself, e.g. #FF0000 for red.



   Note

Browse all our available articles below. Use the search field to search for topics and keywords in real-time.

Article Subtitle
Article Subtitle
Awk by Example, Part 1 An intro to the great language with the strange name
Awk by Example, Part 2 Records, loops, and arrays
Awk by Example, Part 3 String functions and ... checkbooks?
Bash by Example, Part 1 Fundamental programming in the Bourne again shell (bash)
Bash by Example, Part 2 More bash programming fundamentals
Bash by Example, Part 3 Exploring the ebuild system
BTRFS Fun
Funtoo Filesystem Guide, Part 1 Journaling and ReiserFS
Funtoo Filesystem Guide, Part 2 Using ReiserFS and Linux
Funtoo Filesystem Guide, Part 3 Tmpfs and Bind Mounts
Funtoo Filesystem Guide, Part 4 Introducing Ext3
Funtoo Filesystem Guide, Part 5 Ext3 in Action
GUID Booting Guide
Learning Linux LVM, Part 1 Storage management magic with Logical Volume Management
Learning Linux LVM, Part 2 The cvs.gentoo.org upgrade
Libvirt
Linux Fundamentals, Part 1
Linux Fundamentals, Part 2
Linux Fundamentals, Part 3
Linux Fundamentals, Part 4
LVM Fun
Making the Distribution, Part 1
Making the Distribution, Part 2
Making the Distribution, Part 3
Maximum Swappage Getting the most out of swap
On screen annotation Write on top of apps on your screen
OpenSSH Key Management, Part 1 Understanding RSA/DSA Authentication
OpenSSH Key Management, Part 2 Introducing ssh-agent and keychain
OpenSSH Key Management, Part 3 Agent Forwarding
Partition Planning Tips Keeping things organized on disk
Partitioning in Action, Part 1 Moving /home
Partitioning in Action, Part 2 Consolidating data
POSIX Threads Explained, Part 1 A simple and nimble tool for memory sharing
POSIX Threads Explained, Part 2
POSIX Threads Explained, Part 3 Improve efficiency with condition variables
Sed by Example, Part 1
Sed by Example, Part 2
Sed by Example, Part 3
Successful booting with UUID Guide to use UUID for consistent booting.
The Gentoo.org Redesign, Part 1 A site reborn
The Gentoo.org Redesign, Part 2 The Documentation System
The Gentoo.org Redesign, Part 3 The New Main Pages
The Gentoo.org Redesign, Part 4 The Final Touch of XML
Traffic Control
Windows 10 Virtualization with KVM