Ubuntu touchegg 不会在使用 /etc/rc.local 启动时启动

Ubuntu touchegg won't start on startup using /etc/rc.local

我可以 运行 touchegg 成功 sh /etc/rc.local 但它不会在启动时自动启动。

我的内容rc.local:

#!/bin/sh -e
exec 2> /tmp/rc.local.log
nohup touchegg &
exit 0

rc.local 启动时登录:

nohup: appending output to 'nohup.out'
touchegg: cannot connect to X server

我 运行宁 ubuntu 14.04.2

我忘记了这个 post 但我找到了解决方案,我只需要稍等一下,让 lubuntu 初始化 X 服务器。我只是在开头加了sleep