1

linux learner here. (Running on a Debian-derived distro)

My mouse sensitivity was too high so I was able to change it, but can't seem to get it to apply on startup.

I made /etc/init.d/mouse

When I run sudo /etc/init.d/mouse start, the script works fine and the mouse settings are updated.

But I can't get it to run on startup. I tried running sudo update-rc.d mouse defaults, but it still doesn't update when I log out and back in again.

Not sure what else I'm missing in order to make it run on startup.

Related question:

Is /etc/init.d even the right place to be putting it? Or is there some other startup folder that's better for configuration type changes? (As I read init.d is a folder for applications to be run on startup)

  • 1
    /etc/init.d is for scripts that start and stop services on systems with SysV init (Upstart and systemd can be configured to run them, for compatibility). How do you change the sensitivity ? Unless you have a unusual setup, you are probably using xinput or xset to configure Xorg ? In that case the correct way is to change the global Xorg configuration : this affects everyone using the computer, or add the command to your .xprofile (or equivalent for your DM/DE) if it is just for your user account. – Leiaz Nov 23 '14 at 13:11
  • /etc/init.d is for system startup, which doesn't include the GUI startup. How are you setting the mouse sensitivity? If it's via an X11 command, you need to do it when X11 starts. Usually you would add a setting to /etc/X11/xorg.conf. – Gilles Nov 23 '14 at 19:42
0

The init.d scripts aren't run on login, so it's normal that it doesn't run if you just log out and in. They only run on boot, or when changing runlevels.

/etc/init.d is the right place if the settings are global (shared amongst all users) and need only be run on boot. For simple tasks you may instead want to add the commands to /etc/rc.local, which doesn't use the start/stop lifecycle of /etc/init.d scripts.

If the settings should be applied only for a certain user or be applied on each login, the correct place is the relevant profile for your shell (~/.profile, ~/.bash_profile, ~/.bashrc, ...) or, probably more adequate if running a desktop environment, in the session startup programs (each desktop environment sets those in their own way, but they'll be found somewhere in the system settings).

0

Please run chkconfig --list | grep mouse

It should show something like this:

mouse 0:off 1:off 2:off 3:off 4:off 5:off 6:off

If it does, it indicates that the service will not run on startup. You can make it run on startup using :

chkconfig --add mouse

OR

chkconfig --level 35 mouse on

Give it a try.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.