trying to disable touchpad in ~/.profile

Adam Funk a24061 at ducksburg.com
Thu Sep 28 08:18:35 UTC 2017


On 2017-09-25, Tom H wrote:

> On Mon, Sep 25, 2017 at 7:39 AM, Adam Funk <a24061 at ducksburg.com> wrote:
>>
>> I'm running a current Ubuntu-MATE system. This command
>>
>> xinput --set-prop 13 'Device Enabled' 0
>>
>> works from the terminal to disable the touchpad, but it doesn't do
>> anything when I put it in ~/.profile, which I expected to be run while
>> logging in. Where do I need to put that command for that to happen?
>
> Use "$HOME/.xsessionrc" (nor ".xsession" or ".Xsession").

It's not quite working.  I added some debugging lines so my
.xsessionrc currently looks like this:


# AF 2017-09-25: disable touchpad
xinput --set-prop 13 'Device Enabled' 0

TIMESTAMP=`date +%Y%m%d-%H%M`
touch "${HOME}/Desktop/${TIMESTAMP}.xsessionrc.txt"


and it created the empty file on my desktop when I logged in, but the
touchpad was still on.  Maybe the xinput command is getting executed
too early in the GUI login process --- should I try calling a script
in the background that sleeps a few seconds then does the xinput
command?





More information about the ubuntu-users mailing list