I'm an Ubuntu 13.04 user and I'm trying to run a script at startup. I created it in /etc/init.d/
, gave it chmod 755
and ran the update-rc.d <your script> defaults
command. The script is remapping my mouse's keybindings and contains the following:
#! /bin/sh
xinput set-button-map 10 1 2 3 4 5 6 7 9 8
It runs correctly if I do it manually, but I want it to run with startup.
Wouldn't that run it before there's an X Server around for it to interface with?
The simplest way to get this to work would just be to add sh -c "xinput set-button-map 10 1 2 3 4 5 6 7 9 8"
to your start-up applications and that'll run it when you log in.
There's also /etc/xdg/autostart
for all users, into which you can write .desktop files (look at the existing ones for syntax help).
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加