Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2362  / 3 Years ago, tue, october 5, 2021, 3:38:38

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.


More From » scripts

 Answers
2

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).


[#29460] Wednesday, October 6, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
adedes

Total Points: 454
Total Questions: 114
Total Answers: 111

Location: Turks and Caicos Islands
Member since Fri, May 8, 2020
4 Years ago
;