File: README.html

package info (click to toggle)
razercfg 0.43-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 860 kB
  • sloc: ansic: 12,178; python: 1,825; sh: 183; makefile: 26
file content (360 lines) | stat: -rw-r--r-- 13,034 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>README</title>
  <style>
    html {
      color: #1a1a1a;
      background-color: #fdfdfd;
    }
    body {
      margin: 0 auto;
      max-width: 36em;
      padding-left: 50px;
      padding-right: 50px;
      padding-top: 50px;
      padding-bottom: 50px;
      hyphens: auto;
      overflow-wrap: break-word;
      text-rendering: optimizeLegibility;
      font-kerning: normal;
    }
    @media (max-width: 600px) {
      body {
        font-size: 0.9em;
        padding: 12px;
      }
      h1 {
        font-size: 1.8em;
      }
    }
    @media print {
      html {
        background-color: white;
      }
      body {
        background-color: transparent;
        color: black;
        font-size: 12pt;
      }
      p, h2, h3 {
        orphans: 3;
        widows: 3;
      }
      h2, h3, h4 {
        page-break-after: avoid;
      }
    }
    p {
      margin: 1em 0;
    }
    a {
      color: #1a1a1a;
    }
    a:visited {
      color: #1a1a1a;
    }
    img {
      max-width: 100%;
    }
    h1, h2, h3, h4, h5, h6 {
      margin-top: 1.4em;
    }
    h5, h6 {
      font-size: 1em;
      font-style: italic;
    }
    h6 {
      font-weight: normal;
    }
    ol, ul {
      padding-left: 1.7em;
      margin-top: 1em;
    }
    li > ol, li > ul {
      margin-top: 0;
    }
    blockquote {
      margin: 1em 0 1em 1.7em;
      padding-left: 1em;
      border-left: 2px solid #e6e6e6;
      color: #606060;
    }
    code {
      font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
      font-size: 85%;
      margin: 0;
      hyphens: manual;
    }
    pre {
      margin: 1em 0;
      overflow: auto;
    }
    pre code {
      padding: 0;
      overflow: visible;
      overflow-wrap: normal;
    }
    .sourceCode {
     background-color: transparent;
     overflow: visible;
    }
    hr {
      background-color: #1a1a1a;
      border: none;
      height: 1px;
      margin: 1em 0;
    }
    table {
      margin: 1em 0;
      border-collapse: collapse;
      width: 100%;
      overflow-x: auto;
      display: block;
      font-variant-numeric: lining-nums tabular-nums;
    }
    table caption {
      margin-bottom: 0.75em;
    }
    tbody {
      margin-top: 0.5em;
      border-top: 1px solid #1a1a1a;
      border-bottom: 1px solid #1a1a1a;
    }
    th {
      border-top: 1px solid #1a1a1a;
      padding: 0.25em 0.5em 0.25em 0.5em;
    }
    td {
      padding: 0.125em 0.5em 0.25em 0.5em;
    }
    header {
      margin-bottom: 4em;
      text-align: center;
    }
    #TOC li {
      list-style: none;
    }
    #TOC ul {
      padding-left: 1.3em;
    }
    #TOC > ul {
      padding-left: 0;
    }
    #TOC a:not(:hover) {
      text-decoration: none;
    }
    code{white-space: pre-wrap;}
    span.smallcaps{font-variant: small-caps;}
    div.columns{display: flex; gap: min(4vw, 1.5em);}
    div.column{flex: auto; overflow-x: auto;}
    div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
    /* The extra [class] is a hack that increases specificity enough to
       override a similar rule in reveal.js */
    ul.task-list[class]{list-style: none;}
    ul.task-list li input[type="checkbox"] {
      font-size: inherit;
      width: 0.8em;
      margin: 0 0.8em 0.2em -1.6em;
      vertical-align: middle;
    }
    .display.math{display: block; text-align: center; margin: 0.5rem auto;}
  </style>
</head>
<body>
<header id="title-block-header">
<h1 class="title">README</h1>
</header>
<h1 id="razer-device-configuration-tool">Razer device configuration
tool</h1>
<p><a
href="https://bues.ch/h/razercfg">https://bues.ch/h/razercfg</a></p>
<p>This is a configuration utility for Razer devices on Linux
systems.</p>
<h2 id="supported-devices">Supported devices</h2>
<p>Device support table at <a
href="https://bues.ch/h/razercfg#device_support">https://bues.ch/h/razercfg#device_support</a></p>
<h2 id="dependencies">Dependencies</h2>
<ul>
<li><p>Python 3.x: <a
href="https://www.python.org/">https://www.python.org/</a><br />
Debian Linux: <code>apt-get install python3</code></p></li>
<li><p>libusb 1.0: <a
href="http://libusb.org/">http://libusb.org/</a><br />
Debian Linux: <code>apt-get install libusb-1.0-0-dev</code></p></li>
<li><p>PyQt5 (for the graphical qrazercfg tool only): <a
href="https://riverbankcomputing.com/software/pyqt/download5/">https://riverbankcomputing.com/software/pyqt/download5/</a>
Debian Linux: <code>apt-get install python3-pyqt5</code></p></li>
<li><p>cmake 3.5 or later (for building only): <a
href="https://cmake.org/">https://cmake.org/</a><br />
Debian Linux: <code>apt-get install cmake</code></p></li>
</ul>
<p>Note that almost all distributions ship prebuilt packages of the
above dependencies.</p>
<p>If you installed a dependency after you already ran
<code>cmake .</code> and/or <code>make</code>, it might happen that the
dependency is still not found. Just delete the cmake status files or
unpack a clean razercfg tarball to workaround this issue.</p>
<h2 id="building">Building</h2>
<p>First invoke <code>cmake</code> to build the makefiles. Then invoke
<code>make</code> to build the binaries:</p>
<pre>
cmake .
make
</pre>
<p>(Note the required space and dot after the cmake command)</p>
<h2 id="installing">Installing</h2>
<p>First you need to install the tool libraries and binaries. Do this by
executing the following command as root:</p>
<pre>
make install
</pre>
<p>Be aware that <code>make install</code> installs the shared library
<code>librazer.so</code> to <code>$PREFIX/lib</code>. The default
<code>$PREFIX</code> is <code>/usr/local/</code>, but the install prefix
can also be changed via
<code>-DCMAKE_INSTALL_PREFIX='&lt;somewhere&gt;'</code>. You have to
make sure that <code>librazer.so</code> in <code>$PREFIX/lib/</code> can
be found by the dynamic linker <code>ld.so</code>. Your operating system
most likely already has support for libraries in
<code>/usr/local/lib</code>. So on most systems you don’t have to do
anything. If this is not the case, or you installed razercfg somewhere
else, a new library search path can be added via
<code>/etc/ld.so.conf</code> or <code>/etc/ld.so.conf.d/</code>. See
your operating system manual for further information.</p>
<h3 id="if-you-use-systemd">If you use <strong>systemd</strong>:</h3>
<p>The <code>make install</code> step installed the razerd.service file.
Reboot or run the following command as root to start the razerd
daemon:</p>
<pre>
systemctl start razerd
</pre>
<h3 id="if-you-do-not-use-systemd">If you do <strong>not</strong> use
systemd:</h3>
<p>To automatically start the required system daemon <code>razerd</code>
at bootup time, you need to install the init-script. This software
package includes a generic example script, that should work
out-of-the-box on many Linux distributions. To install it, invoke the
following commands as root:</p>
<pre>
cp ./razerd.initscript /etc/init.d/razerd
ln -s /etc/init.d/razerd /etc/rc2.d/S99razerd
ln -s /etc/init.d/razerd /etc/rc5.d/S99razerd
ln -s /etc/init.d/razerd /etc/rc0.d/K01razerd
ln -s /etc/init.d/razerd /etc/rc6.d/K01razerd
</pre>
<h3 id="if-you-use-udev">If you use <strong>udev</strong>:</h3>
The <code>make install</code> step installed the udev script to
<pre>
/etc/udev/rules.d/80-razer.rules
</pre>
<p>This should work on most distributions.</p>
<p>If udev notification does not work, try to reboot the system.</p>
<h2 id="razerd-configuration">RazerD Configuration</h2>
<p>The user may create a razerd configuration file in
<code>/etc/razer.conf</code> which can be used to specify various razerd
options and initial hardware configuration settings. An example config
file is included as <code>razer.conf</code> in this package. If no
configuration file is available, razerd will work with default
settings.</p>
<h2 id="x-window-system-x.org-configuration">X Window System (X.ORG)
Configuration</h2>
<p>If you don’t have an xorg.conf, you don’t have to do anything and it
should work out-of-the-box.</p>
<p>X must <em>not</em> be configured to a specific mouse device like
<code>/dev/input/mouse0</code>. On configuration events, razerd may have
to temporarily unregister the mouse from the system. This will confuse
X, if it’s configured to a specific device. Configure it to the generic
<code>/dev/input/mice</code> device instead. This will enable X to pick
up the mouse again after a configuration event from razerd.</p>
<p>Example xorg.conf snippet:</p>
<pre>
Section "InputDevice"
    Identifier  "Mouse"
    Driver  "mouse"
    Option  "Device" "/dev/input/mice"
EndSection
</pre>
<p>Alternatively, do not specify a <code>"Device"</code> at all. X will
autodetect the device then:</p>
<pre>
Section "InputDevice"
    Identifier  "Mouse"
    Driver  "mouse"
EndSection
</pre>
<p>In any case, do <em>NOT</em> use:
<code>Option "Device" "/dev/input/mouseX"</code></p>
<h2 id="using-the-tools">Using the tools</h2>
<p>To use the tools, the razerd daemon needs to be started as root,
first. Without the background daemon, nothing will work. The daemon is
responsible for doing the lowlevel hardware accesses and for tracking
the current state of the device. While the daemon is running, the user
interfaces <code>razercfg</code> (commandline) and
<code>qrazercfg</code> (graphical user interface) can be used.</p>
<h2 id="uninstalling">Uninstalling</h2>
<p>If you installed razercfg with your distribution packaging system,
use that to uninstall razercfg.</p>
<p>If you compiled razercfg from source and installed it with
<code>make install</code>, you can use the <code>uninstall.sh</code>
script from the razercfg archive to uninstall razercfg from the system.
It must be called with the install prefix as its first argument. That
usually is <code>/usr/local</code>, unless specified otherwise in cmake.
A call to uninstall.sh might look like this:</p>
<pre>
./uninstall.sh /usr/local
</pre>
<h2 id="architecture">Architecture</h2>
<p>The architecture layout of the razer tools looks like this:</p>
<pre>
 -------------------
| hardware driver 0 |--v
 -------------------   |
                       |    ----------
 -------------------   |   | lowlevel |     --------      ---------
| hardware driver 1 |--x---| librazer |----| razerd |----| pyrazer |
 -------------------   |    ----------      --------      ---------
                       |                        |           ^ ^ ^
 -------------------   |     ---------------------------    | | |
| hardware driver n |--^    | (to be written) librazerd |   | | |
 -------------------         ---------------------------    | | |
                                              ^ ^ ^         | | |
                                              | | |         | | |
                           ---------------    | | |         | | |
                          | Application 0 |---^ | |         | | |
                           ---------------      | |         | | |
                                                | |         | | |
                           ---------------      | |         | | |
                          | Application 1 |-----^ |         | | |
                           ---------------        |         | | |
                                                  |         | | |
                           ---------------        |         | | |
                          | Application n |-------^         | | |
                           ---------------                  | | |
                                                            | | |
                           ----------                       | | |
                          | razercfg |----------------------^ | |
                           ----------                         | |
                                                              | |
                           -----------                        | |
                          | qrazercfg |-----------------------^ |
                           -----------                          |
                                                                |
                            --------------------------          |
                          | Other Python applications |---------^
                           ---------------------------
</pre>
<p>So in general, your application wants to access the razer devices
through pyrazer or (if it’s not a python app) through librazerd. (Note
that librazerd is not written, yet. So currently the only way to access
the devices is through pyrazer). Applications should never poke with
lowlevel librazer directly, because there will be no instance that keeps
track of the device state and permissions and concurrency.</p>
<h2 id="license">License</h2>
<p>Copyright (c) 2007-2024 Michael Büsch, et al.</p>
<p>See the COPYING file for license information.</p>
</body>
</html>