[SOLVED] mintupdate fails when started by cron

Questions about applications and software
Forum rules
Before you post please read this

[SOLVED] mintupdate fails when started by cron

Postby rebelxt on Tue Aug 21, 2012 9:00 am

When I try to start mintUpdate from cron, I get the following messages:
Code: Select all
Aug 21 06:33:01 Mint13M cron[1204]: (*system*) RELOAD (/etc/crontab)
Aug 21 06:33:01 Mint13M CRON[2999]: (user) CMD ( mintupdate-launcher)
Aug 21 06:33:01 Mint13M kernel: [ 1749.695877] mintUpdate[3004]: segfault at 968 ip 00007f8a2a55edba sp 00007fffa2bece00 error 4 in libX11.so.6.3.0[7f8a2a536000+12f000]
The mintUpdate log file is, in it's entirety:
Code: Select all
++ Launching mintUpdate in user mode

The idea here is to run apt-get update followed by mintUpdate in user mode once a week. Yes, there are other ways this could be done, but for me, this is the simplest way. So, does anyone know why it doesn't work?

Running mintupdate-launcher from a terminal works just fine. The distro is Mint 13 Mate 64bit.
Last edited by rebelxt on Wed Aug 22, 2012 11:56 am, edited 1 time in total.
rebelxt
Level 2
Level 2
 
Posts: 51
Joined: Sat Jul 16, 2011 9:48 am

Linux Mint is funded by ads and donations.
 

Re: mintupdate fails when started by cron

Postby rebelxt on Wed Aug 22, 2012 8:16 am

OK, I figured out how to create an error log, which shows:
Code: Select all
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1490: Warning: invalid (NULL) pointer instance
  statusIcon = gtk.StatusIcon()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1490: Warning: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
  statusIcon = gtk.StatusIcon()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1490: GtkWarning: IA__gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed
  statusIcon = gtk.StatusIcon()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1490: GtkWarning: IA__gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
  statusIcon = gtk.StatusIcon()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1490: GtkWarning: IA__gdk_x11_display_get_xdisplay: assertion `GDK_IS_DISPLAY (display)' failed
  statusIcon = gtk.StatusIcon()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1490: GtkWarning: IA__gdk_screen_get_number: assertion `GDK_IS_SCREEN (screen)' failed
  statusIcon = gtk.StatusIcon()
Segmentation fault

Any ideas on how to get around this?
rebelxt
Level 2
Level 2
 
Posts: 51
Joined: Sat Jul 16, 2011 9:48 am

Re: mintupdate fails when started by cron

Postby Monsta on Wed Aug 22, 2012 10:38 am

Looks like it's running as root and is unable to connect to X server.
I have no experience of running GUI programs from cron, but here are some links that can be of use:

http://ubuntuforums.org/showthread.php?t=185993
http://ubuntuforums.org/showthread.php?t=1044109
https://help.ubuntu.com/community/CronH ... plications

and, as an alternative,
http://community.linuxmint.com/software ... e-schedule
:)
Monsta
Level 8
Level 8
 
Posts: 2334
Joined: Fri Aug 19, 2011 3:46 am

Re: mintupdate fails when started by cron

Postby rebelxt on Wed Aug 22, 2012 11:55 am

I had seen threads showing the EXPORT command, but hadn't put it together with my problem.

Thanks.

This is the crontab entry that works for demonstration purposes:
*/1 * * * * dave export DISPLAY=:0.0 && mintupdate-launcher 2> /tmp/mintUpdate/launchlog
I do have two monitors.
Now to get it set up with apt-get update to run on a weekly basis.
rebelxt
Level 2
Level 2
 
Posts: 51
Joined: Sat Jul 16, 2011 9:48 am


Return to Software & Applications

Who is online

Users browsing this forum: gvonsem, PatH57 and 22 guests