getting razercfg to work using systemd - systemctl: command not found
My goal is to change my mouse DPI. So any less frustrating solution is also welcome.
I'm trying to get this program to work and i'm following it's README file: http://bues.ch/cms/hacking/razercfg.html
I now need to use the following command:
systemctl start razerd
Trying to use the command above resulted in me needing to install systemd. Trying to install systemd ends up in the following error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package systemd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
systemd-services systemd-services:i386
E: Package 'systemd' has no installation candidate
So i installed systemd-services. Now the systemctl start razerd command results in:
wico@wico-System-Product-Name ~/razer/build $ systemctl start razerd
systemctl: command not found
The readme mentions that i can enter the following commands without using systemd and possibly get it done that way:
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
But doing this just ends up with another error message:
wico@wico-System-Product-Name ~/razer/build $ cp ./razerd.initscript /etc/init.d/razerd
cp: cannot stat ‘./razerd.initscript’: No such file or directory
Then there's what could possibly be a third solution in the README file. But it might just be some info instead. It says:
If you use udev:
The `make install` step installed the udev script to
$(pkg-config --variable=udevdir udev)/rules.d/80-razer.rules
This should work on most distributions.
I'm guessing I could just skip this step but i'll include this for clarity.
This all probably has something to do with me trying it in the wrong folder but the razercfg README file just isn't clear about that and I'm a beginner when it comes to linux.
Previous question regarding the same program installation: checkinstall / make does not work for the program razercfg that I wish to install
When i tried the proposed solution instead of the init-scripts, it seems to have gone right even though there's messages saying things don't match or exist:
wico@wico-System-Product-Name ~/razer $ sudo cp ./razerd.initscript /etc/init.d/razerd
wico@wico-System-Product-Name ~/razer $ sudo update-rc.d razerd enable
update-rc.d: warning: start runlevel arguments (none) do not match razerd Default-Start values (2 3 4 5)
update-rc.d: warning: stop runlevel arguments (none) do not match razerd Default-Stop values (0 1 6)
System start/stop links for /etc/init.d/razerd do not exist.
wico@wico-System-Product-Name ~/razer $ sudo service razerd start
* Starting Razer device state daemon: razerd [ OK ]
wico@wico-System-Product-Name ~/razer $ sudo update-rc.d razerd defaults
Adding system startup for /etc/init.d/razerd ...
/etc/rc0.d/K20razerd -> ../init.d/razerd
/etc/rc1.d/K20razerd -> ../init.d/razerd
/etc/rc6.d/K20razerd -> ../init.d/razerd
/etc/rc2.d/S20razerd -> ../init.d/razerd
/etc/rc3.d/S20razerd -> ../init.d/razerd
/etc/rc4.d/S20razerd -> ../init.d/razerd
/etc/rc5.d/S20razerd -> ../init.d/razerd
After that I browsed to the razer/ui folder and double-clicked the python file called 'qrazercfg' and I'm now able to alter my Razer mouse settings in the graphical user interface mode.
On Ubuntu, systemd
is used on Ubuntu 15.04 and newer. Since you're using Ubuntu 14.04, you need to use init-scripts and the service
command (for example, sudo service razerd start
). You also didn't need to install the systemd-services
package.
The commands copying the init file to /etc/init
and linking the file (the instructions should really be using sudo update-rc.d razerd defaults
), followed by sudo service razerd start
, should work for you. Note that this is mainly so that the program gets started automatically at startup.
The udev rules is likely for access to some hardware on your system.