Script not running at startup

m1tYo

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.

Oli

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]

編集
0

コメントを追加

0

関連記事

分類Dev

Windows 8 not running autohotkey script on startup

分類Dev

Running a bash script from an xsession to toggle startup programs

分類Dev

rc.local not running on startup

分類Dev

Run Python script on startup as root

分類Dev

Windows 8 Run script on startup

分類Dev

Startup script with sudo in Ubuntu 16.10

分類Dev

Run script on Awesome WM startup

分類Dev

Run script on login (script with sudo) or startup

分類Dev

Script running only once

分類Dev

Helping with this jquery script that is not running

分類Dev

How to start a never ending script at startup

分類Dev

Start script on system startup (Ubuntu 16.04.1)

分類Dev

Open terminal window and execute Python script on startup

分類Dev

Start script on system startup (Ubuntu 16.04.1)

分類Dev

Raspberry Pi run script after startup

分類Dev

Run VBS script with privileges on computer startup / log in

分類Dev

Run shell script on startup (Xubuntu 20.04)

分類Dev

Script running from terminal but not in crontab

分類Dev

Running the script to invoke command in terminal

分類Dev

Running shell script loop in parallel

分類Dev

Running find, grep and awk script

分類Dev

Running bash script in a kubernetes pod

分類Dev

Running a Script on connecting USB device

分類Dev

Keep running a script via ssh

分類Dev

crontab versus manual running script

分類Dev

Build without running build script

分類Dev

Script not running in crontab, file not found

分類Dev

Running a script of any language in Ruby

分類Dev

Running VB Script file with arguments