Other distributions do not have the Xsession.d directory and we will need to add a line at the beginning of /etc/X11/Xsession. Remove the following lines in keytouch-2.0/keytouchd/Makefile:
XSESSION_KEYTOUCHD_LINE="keytouchd &"; \
XSESSION_DIR="$(DESTDIR)/etc/X11/Xsession.d"; \
if [ -d $$XSESSION_DIR ]; then \
echo "$$XSESSION_KEYTOUCHD_LINE" > $$XSESSION_DIR/40keytouchd; \
chmod +x $$XSESSION_DIR/40keytouchd; \
else \
XSESSION_FILE="/etc/X11/Xsession"; \
if [ "`grep \"$$XSESSION_KEYTOUCHD_LINE\" \"$$XSESSION_FILE\" -m 1 -h`" != "$$XSESSION_KEYTOUCHD_LINE" ]; then \
XSESSION_TMP=`cat "$$XSESSION_FILE"`; \
echo "$$XSESSION_KEYTOUCHD_LINE" > $$XSESSION_FILE; \
echo "$$XSESSION_TMP" >> $$XSESSION_FILE; \
fi \
fi
Adding the line to /etc/X11/Xsession will be done during the post-install of your package (see section 6)