Comment 12 for bug 971783

Revision history for this message
h1repp (heinz-repp) wrote :

You can remedy this as well. Just put a script (user/group: root/root, executable) within the /etc/pm/sleep.d/ directory, the name starting with anything between 00 and 49, e.g. 01_enable_middleclick and following the instructions in /usr/share/doc/pm-utils/HOWTO.hooks.gz; this will be executed as root whenever the systems suspends or hibernates or resumes from either. Within this script call another script (e.g. /usr/local/sbin/enable_middleclick) as your username using su:

> #!/bin/bash
> case "$1" in
> thaw|resume)
> su -c - <yourusername> /usr/local/sbin/enable_middleclick
> ;;
> *)
> ;;
> esac
> exit $?

The referenced script /usr/local/sbin/enable_middleclick reads:

> #!/bin/bash
> DISPLAY=:0 synclient TapButton3=2

This ensures synclient knows where to apply the settings. That way three finger tap middle click even works after suspend or hibernation. Its a shame on has to resort to such nasty tricks to circumvent Unity's greediness as this bug should have been fixed within this package (one option to turn off the three tap feature would have been enough).