4

I try to execute this command at startup of my desktop to enable a three finger tap on my synaptic touchpad:

synclient TapButton3=2

I tried to put it into /etc/local.rc and I tried to put it into the startup programs, but nothing worked. It is strange: right after boot, the three finger tap works, but after about 10 seconds it seems to be reset.

Where do I have to put this command?

rubo77
  • 32,486
  • Maybe when you log in? As you're unlikely to need it before. Add it to the startup applications? – Tim Aug 31 '14 at 20:51
  • I would be interested in a delayed command like that, I guess I could just write a script with a sleep 20 + the load, because my Gnome Terminal is never opened at the right place (namely, never on the right desktop, I have 4, and nearly never at the right location.) I blame that on loading the terminal too soon, before the desktop is set to its final size by the video driver... – Alexis Wilke Aug 31 '14 at 21:07
  • @Glutanimate I can imagine the comparison, but there is a subtle, but important difference: in that question, it is about a delayed start of an application, with a .desktop file, and so are most of the answers. This is about running a single command after x time. – Jacob Vlijm Sep 01 '14 at 12:39
  • @JacobVlijm True, but the solutions overlap. As soon as you add an autostart entry via the Startup Applications menu it becomes a .desktop file. At this point you might just as well create the .desktop launcher yourself and use the cleaner solution via the inbuilt autostart-delay option. – Glutanimate Sep 01 '14 at 15:14
  • 1
    @Glutanimate also true of course, but the accepted solution here does not elegantly fit the other question, and just using Startup Applications is in this case less work then first creating, then editing the .desktop file I think. But even if that were not the case, possible solutions do not necessarily match. But as said, I can understand the comparison. – Jacob Vlijm Sep 01 '14 at 15:38

1 Answers1

7

As a workaround: simply create a script:

#!/bin/bash

sleep 20
synclient TapButton3=2
  • Save it as something.sh, make it executable (for convenience reasons)

  • Add it to your startup applications: Dash > Startup Applications > Add add the command:

    /path/to/your/script.sh
    

If necessary, you can experiment with the sleep 20 value; from your question, it looks like the command should be run after login process has finished (after it is reset by some process).

At the same time: it would be a more "clean" solution to find out which process makes the settings change, and fix that.

edit:

simpler solution: Add the following to your startup applications (Dash > Startup Applications > Add):

/bin/bash -c "sleep 20&&synclient TapButton3=2"
Jacob Vlijm
  • 83,767
  • I need to put it to 40s then it worked, but yes, It would be better to find out what is causing this delay in the first place: it is happening the same moment the 2x zoom effect is applied: https://bugs.launchpad.net/ubuntu/+source/gconf/+bug/1322026 – rubo77 Aug 31 '14 at 21:25