druhdorfer / flyback

Automatically exported from code.google.com/p/flyback
0 stars 0 forks source link

flyback does not run as crontab or in ssh shell: error: could not find python module gtk #66

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. python /usr/local/flyback/flyback.py --backup 
2. works when run in gui window, does not work in cron or on a remote ssh shell
3. message: error: could not find python module gtk

What is the expected output? What do you see instead?
expected: run the backup. instead: error message

What version of the product are you using? On what operating system?
flyback 0.4.0, python 2.5, gtk2.0, fedora core 8

Please provide any additional information below.
It looks like the command line version unnecessarily tries to call the gui
which is not available in a cron shell or a ssh shell. I recommend to
remove all gui dependencies in case flyback is invoked non-interactively.

Original issue reported on code.google.com by info%emo...@gtempaccount.com on 31 Dec 2008 at 4:40

GoogleCodeExporter commented 8 years ago
I see exactly the same issue in Fedora 10. I've no experience with programming
python. Are the modules loaded prior to the parsing of the command line 
--backup arg?

Original comment by richardg...@gmail.com on 12 Jan 2009 at 7:22

GoogleCodeExporter commented 8 years ago
I solved this by installing xvfb which is essentially a /dev/null Xwindow and  
prefixing the crontab entry with xvfb-run

My crontab entry now reads

0 3 * * * xvfb-run python /opt/flyback/flyback.py --backup

Original comment by espi...@gmail.com on 28 Mar 2011 at 12:13