My Python program SimB.py runs fine if I start it with sudo python SimB.py 
using a keyboard attached to my BBB.
So I gave crontab a try again, putting it in /etc. Here's my crontab and 
crontab -l which seems to say my python program is running but I don't see 
that it has done anything, don't see anything running on my BBB 4DCAPE 
screen. I saw something in the CronHowTo () page about GUI's but haven't 
tried that yet, figuring that I would just try to start SimB.py and see 
what happened. So what to do next?

Thanks in advance for help,
John


<https://lh3.googleusercontent.com/-xlAZ4lTfpEQ/VxcI6uzi-ZI/AAAAAAAABO8/mKaxRI5Fk7ASwto46EaSSevQlzCGjEN4gCLcB/s1600/crontab_test.png>


On Sunday, April 17, 2016 at 5:55:29 PM UTC-7, Dennis Lee Bieber wrote:
>
> On Sat, 16 Apr 2016 20:35:44 -0700, John Baker 
> <john...@ieee.org <javascript:>> declaimed the following: 
>
> >Really good idea evilwulfie. That, xwindows, sounds like the problem. 
> > 
> >Now I'm thinking that I should put a startup icon on the Debian desktop 
> >to start my program, since I know that I can start it with the terminal 
> >program with sudo python myProgram.py. That has always worked, whereas I 
> >cannot start it via putty which apparently requires xwindow. It doesn't 
> >seem like this should be so hard, but probably just hard as I am not 
> >knowledgeable with Linux. 
>
>         Putty does not require an X-window environment -- it's your 
> program 
> using Tkinter that needs to have an X-window environment. That is, it has 
> to have someplace to send the drawing commands for the GUI you want to 
> use. 
> Putty is basically a text console, it does not know X-window. (In fact, 
> putty is likely running on a M$ Windows box and uses the Win32 runtime -- 
> only text transfers between it and the BBB login) 
>
>
> http://support.objectplanet.com/esupport/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=17
>  
>
>         When you connect via keyboard and HDMI, you are running the 
> X-server on 
> localhost (the BBB). (It actually gets set up for that session on boot) 
>
>         From putty -- you'd have to have an X-server running on your M$ 
> Windows 
> box, and then issue command through putty to set the display to the 
> Windows 
> box, before starting the Tkinter program. 
>
>
> >Thanks for your suggestion, 
> >John 
> > 
> >On 4/16/2016 6:20 PM, evilwulfie wrote: 
> >> I Am saying that if your depending on the GUI for any part of your 
> >> program it may expect the xwindow system to be active before 
> >> it starts, then seeing that the GUI is not running just exits. 
> >> 
> >> It's hard to second guess what your program is doing here but it "may" 
> >> be the issue. 
> >> 
> >> try checking for the xwindow system being running before starting your 
> >> program. 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> On 4/16/2016 6:16 PM, John Baker wrote: 
> >>> Hi Wulf Man, 
> >>> My GUI is part of a simulation program. There's a lot of calculation 
> >>> and the GUI to allow me to enter some parameters and display the 
> >>> results on a graph. You're saying that I have to start up my 
> >>> calculation part of the program and then the GUI? 
> >>> John 
> >>> 
> >>> On Saturday, April 16, 2016 at 5:37:07 PM UTC-7, Wulf Man wrote: 
> >>> 
> >>>     If this is a GUI only program you need to start your program 
> >>>     after the GUI is up, I don't see this check in your crontab file 
> >>>     Been too long since i have done this but i am sure google is your 
> >>>     friend 
> >>> 
> >>> 
> >>> 
> >>>     On 4/16/2016 4:53 PM, John Baker wrote: 
> >>>>     Hi Dieter, 
> >>>>     Still not working. I have a hunch that the problem is with 
> >>>>     Tkinter but can't tell. I have to run my GUI program SimB.py 
> >>>>     with the terminal program on the BBB, typing sudo python 
> >>>>     SimB.py, then it runs happily. 
> >>>> 
> >>>>     *Here's my crontab in /etc:* 
> >>>>     # /etc/crontab: system-wide crontab 
> >>>>     # Unlike any other crontab you don't have to run the `crontab' 
> >>>>     # command to install the new version when you edit this file 
> >>>>     # and files in /etc/cron.d. These files also have username 
> fields, 
> >>>>     # that none of the other crontabs do. 
> >>>> 
> >>>>     SHELL=/bin/sh 
> >>>>     PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 
> >>>> 
> >>>>     # m h dom mon dow usercommand 
> >>>>     17 ** * *root  cd / && run-parts --report /etc/cron.hourly 
> >>>>     25 6* * *roottest -x /usr/sbin/anacron || ( cd / && run-parts 
> >>>>     --report /etc/cron.daily ) 
> >>>>     47 6* * 7roottest -x /usr/sbin/anacron || ( cd / && run-parts 
> >>>>     --report /etc/cron.weekly ) 
> >>>>     52 61 * *roottest -x /usr/sbin/anacron || ( cd / && run-parts 
> >>>>     --report /etc/cron.monthly ) 
> >>>>     # 
> >>>>     @reboot root /usr/bin/python /home/debian/Desktop/SimB.py 
> >>>>     * * * * * root /usr/bin/python /home/debian/Desktop/SimB.py 
> >>>> 
> >>>>     *and here's from the syslog file that doesn't tell me anything:* 
> >>>> 
> >>>>     Apr 16 23:37:01 beaglebone /USR/SBIN/CRON[2293]: (root) CMD 
> >>>>     (sudo python /home/debian/Desktop/SimB.py) 
> >>>> 
> >>>>     Apr 16 23:37:01 beaglebone /USR/SBIN/CRON[2294]: (debian) CMD 
> >>>>     (sudo python /home/debian/Desktop/SimB.py) 
> >>>> 
> >>>>     Apr 16 23:37:01 beaglebone /USR/SBIN/CRON[2295]: (root) CMD 
> >>>>     (/usr/bin/python /home/debian/Desktop/SimB.py) 
> >>>> 
> >>>>     Apr 16 23:37:14 beaglebone /USR/SBIN/CRON[2292]: (CRON) info (No 
> >>>>     MTA installed, discarding output) 
> >>>> 
> >>>>     Apr 16 23:37:14 beaglebone /USR/SBIN/CRON[2290]: (CRON) info (No 
> >>>>     MTA installed, discarding output) 
> >>>> 
> >>>>     Apr 16 23:37:14 beaglebone /USR/SBIN/CRON[2291]: (CRON) info (No 
> >>>>     MTA installed, discarding output) 
> >>>> 
> >>>> 
> >>>>     I can successfully run my program with a keyboard attached to my 
> >>>>     BBB using sudo python SimB.py, have to use the sudo, otherwise 
> >>>>     gets a Tkinter error. I just now double-checked and my GUI 
> >>>>     program SimB.py runs very happily. Cannot run SimB.py thru putty 
> >>>>     as it gives the Tkinter error. 
> >>>> 
> >>>>     Any ideas? 
> >>>>     Thanks, 
> >>>>     John 
> >>>> 
> >>>>     On Saturday, April 16, 2016 at 1:04:21 AM UTC-7, Dieter Wirz 
> wrote: 
> >>>> 
> >>>>         On Sat, Apr 16, 2016 at 5:57 AM, John Baker 
> >>>>         <bakerengi...@gmail.com>wrote: 
> >>>> 
> >>>>             John Minton, 
> >>>>             I gave crontab a try and of course it didn't work. It 
> >>>>             seems like this should be a piece of cake to do. I 
> >>>>             probably did something wrong. I checked the syslog and 
> >>>>             see an error: "No MTA installed." 
> >>>> 
> >>>> 
> >>>>         ? 
> >>>>         If u? 
> >>>>         ? have an error in ?crontab the crontab tries to send you an 
> >>>>         Email... And of coarse cannot without MTA;) 
> >>>> 
> >>>>             My crontab file says: 
> >>>>             ? ? 
> >>>>             @reboot sudo python /home/debian/Desktop/myProg.py 
> >>>>             * * * * * sudo python /home/debian/Desktop/myProg.py 
> >>>> 
> >>>> 
> >>>>         ? The are two crontabs, users and system crontab. 
> >>>>         Users crontab you can change with 
> >>>>         $ crontab -e 
> >>>>         System crontab with 
> >>>>         $ sudo nano /etc/crontab 
> >>>> 
> >>>>         If u want to run a process as root, then best is, if u add 
> >>>> 
> >>>>             @reboot root /usr/bin/python 
> /home/debian/Desktop/myProg.py 
> >>>>             * * * * * root /usr/bin/python 
> >>>>             /home/debian/Desktop/myProg.py 
> >>>> 
> >>>>         to /etc/crontab 
> >>>> 
> >>>>         HTH 
> >>>> 
> >>>>     -- 
> >>>>     For more options, visit http://beagleboard.org/discuss 
> >>>>     --- 
> >>>>     You received this message because you are subscribed to the 
> >>>>     Google Groups "BeagleBoard" group. 
> >>>>     To unsubscribe from this group and stop receiving emails from 
> >>>>     it, send an email to beagleboard...@googlegroups.com 
> <javascript:>. 
> >>>>     To view this discussion on the web visit 
> >>>>     
> https://groups.google.com/d/msgid/beagleboard/ad44be62-e803-43e8-b131-131d16fd92f9%40googlegroups.com.
>  
>
> >>>>     For more options, visit https://groups.google.com/d/optout 
> >>>>     <https://groups.google.com/d/optout>. 
> >>> 
> >>> 
> >>>     <
> https://www.avast.com/en-us/lp-esg-fav?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=oa-2109-v2-b>
>  
>
> >>>             Virus-free. www.avast.com 
> >>>     <
> https://www.avast.com/en-us/lp-esg-fav?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=oa-2109-v2-b>
>  
>
> >>> 
> >>> 
> >>> -- 
> >>> For more options, visit http://beagleboard.org/discuss 
> >>> --- 
> >>> You received this message because you are subscribed to the Google 
> >>> Groups "BeagleBoard" group. 
> >>> To unsubscribe from this group and stop receiving emails from it, 
> >>> send an email to beagleboard...@googlegroups.com <javascript:> 
> >>> <mailto:beagleboard+unsubscr...@googlegroups.com <javascript:>>. 
> >>> To view this discussion on the web visit 
> >>> 
> https://groups.google.com/d/msgid/beagleboard/116fae1e-3ad7-4949-87ee-63a907b32cda%40googlegroups.com.
>  
>
> >>> For more options, visit https://groups.google.com/d/optout. 
> >> 
> >> 
> >> <
> https://www.avast.com/en-us/lp-esg-fav?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=oa-2109-v2-b>
>  
>
> >>         Virus-free. www.avast.com 
> >> <
> https://www.avast.com/en-us/lp-esg-fav?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=oa-2109-v2-b>
>  
>
> >> 
> >> 
> >> -- 
> >> For more options, visit http://beagleboard.org/discuss 
> >> --- 
> >> You received this message because you are subscribed to a topic in the 
> >> Google Groups "BeagleBoard" group. 
> >> To unsubscribe from this topic, visit 
> >> https://groups.google.com/d/topic/beagleboard/ULeYE9kjqZ4/unsubscribe. 
> >> To unsubscribe from this group and all its topics, send an email to 
> >> beagleboard...@googlegroups.com <javascript:> 
> >> <mailto:beagleboard+unsubscr...@googlegroups.com <javascript:>>. 
> >> To view this discussion on the web visit 
> >> 
> https://groups.google.com/d/msgid/beagleboard/5712E4F6.4030708%40gmail.com 
> >> <
> https://groups.google.com/d/msgid/beagleboard/5712E4F6.4030708%40gmail.com?utm_medium=email&utm_source=footer>.
>  
>
> >> For more options, visit https://groups.google.com/d/optout. 
> -- 
>         Wulfraed                 Dennis Lee Bieber         AF6VN 
>     wlf...@ix.netcom.com <javascript:>    HTTP://wlfraed.home.netcom.com/ 
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/4b2eb885-9a44-451c-8cdb-c2865c7d211a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to