Perhaps crontab will not execute 'notify-send' command because it is a GUI thing
The following commands work fine via terminal.
notify-send a
/usr/bin/notify-send a
they both work fine.
now let's put them inside of a cron file.
gedit /var/spool/cron/root
and paste..
* * * * * notify-send a
* * * * * /usr/bin/notify-send a
given that there is no way to debug, we have to head over to webmin and then run it from webmin.
this is the output:
Output from command notify-send a ..
(notify-send:6853): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
second one:
Output from command /usr/bin/notify-send a ..
(/usr/bin/notify-send:6875): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
given the condition that these commands work fine via terminal..
perhaps this has to do with "GUI" desktop thing. given that crontab is not designed to execute things for the "GUI" desktop by default perhaps.
so i suppose the solution is to execute these commands in a "GUI" way.
what would be the command to execute so that these get executed for the DESKTOP ?
my operating system is:
Centos Linux Desktop Minimal 6.4
The following commands work fine via terminal.
notify-send a
/usr/bin/notify-send a
they both work fine.
now let's put them inside of a cron file.
gedit /var/spool/cron/root
and paste..
* * * * * notify-send a
* * * * * /usr/bin/notify-send a
given that there is no way to debug, we have to head over to webmin and then run it from webmin.
this is the output:
Output from command notify-send a ..
(notify-send:6853): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
second one:
Output from command /usr/bin/notify-send a ..
(/usr/bin/notify-send:6875): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
given the condition that these commands work fine via terminal..
perhaps this has to do with "GUI" desktop thing. given that crontab is not designed to execute things for the "GUI" desktop by default perhaps.
so i suppose the solution is to execute these commands in a "GUI" way.
what would be the command to execute so that these get executed for the DESKTOP ?
my operating system is:
Centos Linux Desktop Minimal 6.4
No comments:
Post a Comment