Debian Codegraph @

README.html

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