Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.28 KB | None | 0 0
  1. ******************************************
  2. * Razer device configuration tool *
  3. * Copyright (c) 2007-2014 Michael Buesch *
  4. ******************************************
  5.  
  6. This is a configuration utility for Razer devices on Linux systems.
  7.  
  8.  
  9. DEPENDENCIES
  10. ============
  11.  
  12. * Python 3.x
  13. https://www.python.org/
  14. Debian Linux:
  15. apt-get install python3
  16.  
  17. * libusb 1.0
  18. http://libusb.org/
  19. Debian Linux:
  20. apt-get install libusb-1.0-0-dev
  21.  
  22. * PySide (for the graphical qrazercfg tool only)
  23. https://qt-project.org/wiki/PySide
  24. Debian Linux:
  25. apt-get install python3-pyside
  26.  
  27. * cmake 2.4 or later (for building only)
  28. http://www.cmake.org/
  29. Debian Linux:
  30. apt-get install cmake
  31.  
  32. Note that almost all distributions ship prebuilt packages of the
  33. above dependencies.
  34.  
  35. If you installed a dependency after you already ran `cmake .` and/or `make`, it
  36. might happen that the dependency is still not found. Just delete the cmake
  37. status files or unpack a clean razercfg tarball to workaround this issue.
  38.  
  39.  
  40. BUILDING
  41. ========
  42.  
  43. First invoke "cmake" to build the makefiles.
  44. Then invoke "make" to build the binaries:
  45.  
  46. cmake .
  47. make
  48.  
  49. (Note the required space and dot after the cmake command)
  50.  
  51.  
  52. INSTALLING
  53. ==========
  54.  
  55. First you need to install the tool libraries and binaries. Do this by executing
  56. the following command as root:
  57.  
  58. make install
  59.  
  60.  
  61. If you use systemd:
  62.  
  63. The `make install` step installed the razerd.service file. Reboot or run the
  64. following command as root to start the razerd daemon:
  65.  
  66. systemctl start razerd
  67.  
  68.  
  69. If you do NOT use systemd:
  70.  
  71. To automatically start the required system daemon "razerd" at bootup time, you
  72. need to install the init-script. This software package includes a generic
  73. example script, that should work out-of-the-box on many Linux distributions. To
  74. install it, invoke the following commands as root:
  75.  
  76. cp ./razerd.initscript /etc/init.d/razerd
  77. ln -s /etc/init.d/razerd /etc/rc2.d/S99razerd
  78. ln -s /etc/init.d/razerd /etc/rc5.d/S99razerd
  79. ln -s /etc/init.d/razerd /etc/rc0.d/K01razerd
  80. ln -s /etc/init.d/razerd /etc/rc6.d/K01razerd
  81.  
  82.  
  83. If you use udev:
  84.  
  85. The `make install` step installed the udev script to
  86. $(pkg-config --variable=udevdir udev)/rules.d/80-razer.rules
  87. This should work on most distributions.
  88.  
  89. If udev notification does not work, try to reboot the system.
  90.  
  91.  
  92. RAZERD CONFIGURATION
  93. ====================
  94.  
  95. The user may create a razerd configuration file in /etc/razer.conf which can be
  96. used to specify various razerd options and initial hardware configuration
  97. settings.
  98. An example config file is included as "razer.conf" in this package.
  99. If no configuration file is available, razerd will work with default settings.
  100.  
  101.  
  102. X WINDOW SYSTEM (X.ORG) CONFIGURATION
  103. ================================
  104.  
  105. If you don't have an xorg.conf, you don't have to do anything and it should work
  106. out-of-the-box.
  107.  
  108. X must _not_ be configured to a specific mouse device like /dev/input/mouse0. On
  109. configuration events, razerd may have to temporarily unregister the mouse from
  110. the system. This will confuse X, if it's configured to a specific device.
  111. Configure it to the generic /dev/input/mice device instead. This will enable X
  112. to pick up the mouse again after a configuration event from razerd.
  113.  
  114. Example xorg.conf snippet:
  115. ...
  116. Section "InputDevice"
  117. Identifier "Mouse"
  118. Driver "mouse"
  119. Option "Device" "/dev/input/mice"
  120. EndSection
  121. ...
  122.  
  123. Alternatively, do not specify a "Device" at all. X will autodetect the device
  124. then:
  125. ...
  126. Section "InputDevice"
  127. Identifier "Mouse"
  128. Driver "mouse"
  129. EndSection
  130. ...
  131.  
  132. In any case, do _NOT_ use:
  133. Option "Device" "/dev/input/mouseX"
  134.  
  135.  
  136. USING THE TOOLS
  137. ===============
  138.  
  139. To use the tools, the razerd daemon needs to be started as root, first. Without
  140. the background daemon, nothing will work. The daemon is responsible for doing
  141. the lowlevel hardware accesses and for tracking the current state of the device.
  142. While the daemon is running, the user interfaces "razercfg" (commandline) and
  143. "qrazercfg" (graphical user interface) can be used.
  144.  
  145.  
  146. UNINSTALLING
  147. ============
  148.  
  149. If you installed razercfg with your distribution packaging system, use that to
  150. uninstall razercfg.
  151.  
  152. If you compiled razercfg from source and installed it with `make install`, you
  153. can use the "uninstall.sh" script from the razercfg archive to uninstall
  154. razercfg from the system. It must be called with the install prefix as its first
  155. argument. That usually is /usr/local, unless specified otherwise in cmake. A
  156. call to uninstall.sh might look like this:
  157.  
  158. ./uninstall.sh /usr/local
  159.  
  160.  
  161. ARCHITECTURE
  162. ============
  163.  
  164. The architecture layout of the razer tools looks like this:
  165.  
  166.  
  167. -------------------
  168. | hardware driver 0 |--v
  169. ------------------- |
  170. | ----------
  171. ------------------- | | lowlevel | -------- ---------
  172. | hardware driver 1 |--x---| librazer |----| razerd |----| pyrazer |
  173. ------------------- | ---------- -------- ---------
  174. | | ^ ^ ^
  175. ------------------- | --------------------------- | | |
  176. | hardware driver n |--^ | (to be written) librazerd | | | |
  177. ------------------- --------------------------- | | |
  178. ^ ^ ^ | | |
  179. | | | | | |
  180. --------------- | | | | | |
  181. | Application 0 |---^ | | | | |
  182. --------------- | | | | |
  183. | | | | |
  184. --------------- | | | | |
  185. | Application 1 |-----^ | | | |
  186. --------------- | | | |
  187. | | | |
  188. --------------- | | | |
  189. | Application n |-------^ | | |
  190. --------------- | | |
  191. | | |
  192. ---------- | | |
  193. | razercfg |----------------------^ | |
  194. ---------- | |
  195. | |
  196. ----------- | |
  197. | qrazercfg |-----------------------^ |
  198. ----------- |
  199. |
  200. -------------------------- |
  201. | Other Python applications |---------^
  202. ---------------------------
  203.  
  204. So in general, your application wants to access the razer devices through
  205. pyrazer or (if it's not a python app) through librazerd.
  206. (Note that librazerd is not written, yet. So currently the only way to access
  207. the devices is through pyrazer).
  208. Applications should never poke with lowlevel librazer directly, because there
  209. will be no instance that keeps track of the device state and permissions and
  210. concurrency.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement