python-notify module & cron: gio.Error
问题 I'm asking some help to show notifications using python-crontab, because everything I've tried do not work. The display is not initilised when the script is launched by cron. When I start it manually, that's work. The codes I've tried: #!/usr/bin/env python # coding: utf8 import subprocess import os #os.environ.setdefault("XAUTHORITY", "/home/guillaume" + "/.Xauthority") #os.environ.setdefault('DISPLAY', ':0.0') # do not work #os.environ['DISPLAY'] = ':0.0' # do not work print = os.environ