Ubuntu – Configuring Lubuntu to run a script when LXDE starts

scripts

I'm using Lubuntu and LXDE. How can I configure it such that when LXDE starts, it runs the following script to turn off the trackpad:

xinput disable 14

I tried to make the files ~/.config/autostart/ as

[Desktop Entry]

Type=Application

Exec=xinput disable 14

and the file .desktop as

[Desktop Entry]
Type=Application
Exec=xinput disable 14
StartupNotify=false
Terminal=false
Hidden=false

Also, I didn't found anything suitable in the program lxsession-edit.

Best Answer

  • Assuming you're using Lubuntu 13.10, edit ~/.config/lxsession/Lubuntu/autostart. Add the appropriate command on a separate line to the end of the existing file. If such a file doesn't exist, create it with Leafpad or nano.

    By the way, are you sure about xinput disable 14? Based on man xinput, it appears that xinput --disable 14 may be correct.

    --enable device Enable the device. This call is equivalent to xinput --set-prop device "Device Enabled" 1

    --disable device Disable the device. This call is equivalent to xinput --set-prop device "Device Enabled" 0


    Edit: I asked about -- here.

  • Related Question