1GPM-ROOT(1) General Commands Manual GPM-ROOT(1)
2
3
4
6 gpm-root - a default handler for gpm, used to draw menus on the root
7 window
8
10 gpm-root [ options ]
11
13 The program gpm-root is designed to handle Control-Mouse events to draw
14 menus on the background of the current tty. The actual menus are
15 described by a configuration file in the user's home directory.
16
17
18 Please note that gpm-root needs to run with Linux 1.1.73 or newer,
19 because previous kernels lack some screen handling capabilities
20 required by the program.
21
22
23 The program uses the files /dev/vcs* to draw to the console screen.
24 These are available only from kernel 1.1.81 onward. If you miss those
25 device nodes, you should create them using create_vcs in the distribu‐
26 tion directory. The tool won't run with kernels older than 1.1.81,
27 because they lacked a full screen dump/restore capability.
28
29
30 Available command line options are the following:
31
32 -m number
33 Choose the modifier to use (by default: control). The modifier
34 can be provided either as a number or as a symbolic string.
35 Allowed strings are shift, anyAlt, leftAlt, rightAlt, control.
36
37 -u Deny using user-specific configuration files. With this option
38 on, only /etc/gpm-root.conf will be used as a source of configu‐
39 ration information. This option is intended for those system
40 administrators who fear security could be broken by this daemon.
41 Things should be sufficiently secure, but if you find a hole
42 please tell me about it.
43
44 -D Do not automatically enter background operation when started,
45 and log messages to the standard error stream, not the syslog
46 mechanism. This is useful for debugging; in previous releases
47 it was done with a compile-time option.
48
49 -V verbosity increment
50 Raise the maximum level of messages that will be logged. Thus a
51 positive argument has the effect of making the program more ver‐
52 bose. One can also give a negative argument to hush the pro‐
53 gram; however, note that due to getopt(3) rules a negative argu‐
54 ment must follow the option with no space betwixt (that is, -V-1
55 but not -V -1). Program Arguments,,,libc. The argument is
56 optional and its default value is 1.
57
58
59 Each time a menu is drawn, the configuration file is reparsed if it has
60 changed. This allows modification of personal setup without reinvoking
61 the daemon.
62
63
64 The actual configuration file is better introduced by looking at your
65 /etc/gpm-root.conf.
66
67
68 The syntax for the file won't be described here, being it quite appar‐
69 ent from the example above. Blanks and newlines are unused in parsing
70 the file, and the layout of the file is free. Comments are allowed in
71 the file: any hash mark (#) found at the beginning of the line or after
72 white space makes the parser discard anything up to the next line. To
73 insert quotes (") in strings precede them with a backslash.
74
75
76 Note that recursive menus are allowed, to any level of recursion.
77
78
79 Keywords belong to three groups: the button keyword, the cfg keywords
80 and the action keywords. They are all described in the table below:
81
82 button number menu
83 The button keyword is used to introduce a menu. It is followed
84 by the number of the relevant button (1=left, 2=middle,
85 3=right), an open brace, a menu and a closed brace. A menu is
86 made up of cfg statements, followed by action statements. Cfg
87 statements can come in any order, while the order of action
88 statements tells the actual order in which actions will appear
89 on the screen, top to bottom.
90
91
92 The following statements belong to the cfg set.
93
94 name string
95 If the name keyword is present, the specified string will be
96 used as the name for the current menu.
97
98 background color
99 This statements is used to specify the background color to be
100 used in the current menu. The color can be specified with one of
101 the eight canonical strings black, red, cyan etc. The background
102 defaults to black.
103
104 foreground color
105 This statements is used to specify the foreground color for menu
106 items. Its value defaults to white. An optional bright keyword
107 can appear before the actual color.
108
109 border color
110 border is used to specify the border color for the menu. Its
111 value defaults to white. An optional bright keyword can appear
112 before the actual color.
113
114 head color
115 head is used to specify the foreground color for the title of
116 the menu. Its value defaults to white. An optional bright key‐
117 word can appear before the actual color.
118
119
120 The following statements belong to the action set.
121
122 string f.fgcmd cmdstring
123 When the mouse button is released above the corresponding menu
124 item, the cmdstring is pasted in the keyboard queue of the cur‐
125 rent console. This is not yet implemented.
126
127 string f.bgcmd cmdstring
128 When the mouse button is released above the corresponding menu
129 item, a shell (/bin/sh) is forked to execute the specified com‐
130 mand, with stdin connected to /dev/null, and stdout, stderr con‐
131 nected to the active console.
132
133 string f.jptty ttynumber
134 When the mouse button is released above the corresponding menu
135 item, the console is switched to the one specified. The ttynum‐
136 ber must be specified as a string. Any tty can be reached this
137 way, even those which are not accessible via the keyboard.
138
139 string f.mktty ttynumber
140 When the mouse button is released above the corresponding menu
141 item, an unused console is selected, and /sbin/mingetty is exe‐
142 cuted in it. The current console is switched to the newly opened
143 console. I use this command to save kernel memory by opening a
144 single console through /etc/inittab and requesting the others
145 only when i need to login.
146
147 string Whole-menu
148 A menu can directly follow the label string. When the mouse
149 pointer leaves the menu frame at the level of string, a second
150 menu is posted on screen.
151
152 string f.lock
153 When the mouse button is released above the corresponding menu
154 item, the keyboard and the screen are locked, and only the lock‐
155 ing user or the superuser can unlock them. This is not yet
156 implemented.
157
158 string f.load
159 The current loadavg when the menu is posted is concatenated to
160 string to build the actual message displayed on screen. Nothing
161 happens at button release.
162
163 string f.free
164 The free memory and swap when the menu is posted is concatenated
165 to string to build the actual message displayed on screen. Noth‐
166 ing happens at button release.
167
168 string f.time
169 The current time is formatted with strftime(3), according to
170 string. The resulting string is the actual message displayed on
171 screen. Nothing happens at button release.
172
173 string f.pipe cmdline
174 When the mouse pointer leaves the menu frame at the level of
175 string, a message box is posted on screen showing the last ten
176 lines of the output of cmdline. cmdline is executed by /bin/sh.
177 This is not yet implemented.
178
179
180
181 string f.nop
182 This does nothing, it only displays string on the menu.
183
184
185 The HOME, LOGNAME and USER environment variables are setup to the val‐
186 ues for the invoking user before spawning an external process (f.bgcmd,
187 f.pipe). The current directory is always /.
188
189
191 Known bugs have been fixed. In particular, if you invoke gpm-root right
192 after gpm, it will delay a few seconds before trying to connect to the
193 daemon.
194
195
197 Alessandro Rubini <rubini@linux.it>
198
199
201 /dev/gpmctl The socket used to connect to gpm.
202 /etc/gpm-root.conf The default configuration file.
203 $(HOME)/.gpm-root The user configuration file.
204 /dev/vcs* Virtual Console Screens
205
206
208 gpm(8)
209
210 The info file about `gpm', which gives more complete information and
211 explains how to write a gpm client.
212
213
214
2154th Berkeley Distribution February 1995 GPM-ROOT(1)