Hello David and John,

Thanks for your reactions. Sorry for the delay, was occupied with some
other duties like skiing....
echo $DISPLAY from the debian command line returns nothing (a blank line).
The same command form the debian command line coming from the LXDE
interface gives: :0. So I issue the sudo python myprog.py command after the
LXDE shell has been loaded: that works for me.I need sudo because of the
Adafruit library, but I suppose that is another story.
Would be great to run the program without LXDE but I guess that will not
work.
The next problem is: how to run the program automatically upon start-up. I
prefer without LXDE but I am afraid that is not possible. So I need to
start myprog.py form a kind of start-up script....
Btw: what is X11? The link is not terribly clear for me as a novice...

Best regards,
Harke


On Sat, Mar 26, 2016 at 10:01 PM, David Good <david.go...@gmail.com> wrote:

> It looks like you need to set the DISPLAY environment variable so that
> tkinter knows which display to use.
>
> Is X11 installed on the BBB?
>
> On my linux machine, when I try echo $DISPLAY, I get ":0.0" without the
> quotes.
>
> What happens if you run that command?
>
> You might check out some of the info on this page as well.
>
>
> http://unix.stackexchange.com/questions/17255/is-there-a-command-to-list-all-open-displays-on-a-machine
>
> --David
>
> On Sat, Mar 26, 2016 at 1:59 PM, John Baker <bakerengineerin...@gmail.com>
> wrote:
>
>> Harke:
>> Another in the Learned Group, I think it was Steve Plant but I can't find
>> the post, suggested connecting a keyboard and mouse to the BBB and running
>> the Python program with 'sudo python your_python_program'. That worked
>> great for me. I never would have thought of it. My code is a GUI with
>> buttons, text boxes and an animation graph running Tkinter and also running
>> PyBBIO for PWM output and ADC inputs.
>> John
>> johnbakeree.blogspot.com
>>
>> On Saturday, February 13, 2016 at 3:07:04 AM UTC-8, Harke Smits wrote:
>>>
>>> Hello Learned Group,
>>>
>>> I have a BBB running Debian (2015-11-03 version) with a Chipsee 4.3
>>> display. It works great, so far so good: both in graphic mode and text. I
>>> try to script an application requiring a GUI, so I loaded Tkinter and
>>> entered a test program.
>>> This is the result:
>>>
>>> Traceback (most recent call last):
>>>   File "testtk.py", line 2, in <module>
>>>     root = Tkinter.Tk()
>>>   File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1712, in __init__
>>>     self.tk = _tkinter.create(screenName, baseName, className,
>>> interactive, wantobjects, useTk, sync, use)
>>> _tkinter.TclError: no display name and no $DISPLAY environment variable
>>> root@beaglebone:/home/apptest#
>>>
>>> Its the same whether I run from BBB via bash or via another pc with
>>> Cloud9.
>>>
>>> I googled a lot and the error is not uncommon, but could not find a clue
>>> for my case.
>>>
>>> Please advise, regards,
>>> Harke
>>>
>> --
>> 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.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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/w7vDlQctKD8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beagleboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to