I just now discovered the problem requiring sudo to start my python program. It's related to PyBBIO library code to write to the PWM interface on the BBB. I am trying to find out if there is a way around this requirement (to run the code as root) but I may be stuck with it. :-(

I get a permission denied error related to the capemgr.9 if I don't run my code as root.
IOError: [Errno 13] Permission denied: '/sys/devices/bone_capmgr.9/slots'

John

On 4/17/2016 9:39 AM, Dennis Lee Bieber wrote:
On Sat, 16 Apr 2016 16:53:16 -0700 (PDT), John Baker
<[email protected]> declaimed the
following:

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.

        The key phrase is "GUI program".

*Here's my crontab in /etc:*
@reboot root /usr/bin/python /home/debian/Desktop/SimB.py
* * * * * root /usr/bin/python /home/debian/Desktop/SimB.py

        "cron" jobs do not have a console, much less a graphical session
manager.

Apr 16 23:37:14 beaglebone /USR/SBIN/CRON[2292]: (CRON) info (No MTA
installed, discarding output)

        You do not have local mail transfer agent (SMTPd or equivalent) so
whatever error trace cron was going to send is being dropped on the floor.


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.

        putty implies a text console connection -- unless you have an X-server
running on the computer AND have configured the login via putty to use the
computer X-server (environment variable for DISPLAY pointing to the
computer) there is no graphical environment in which to open the GUI
program.

        When using a direct keyboard/mouse and HDMI connection, the BBB is
running a local X-server and the (automatic) login is running a
desktop/window manager that connects to that X-server. Not sure why you'd
need the sudo -- Tkinter should be able to open a window from the account
that is running the session manager.


--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/5713D4C9.8090005%40ieee.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to