Re: [beagleboard] Re: BBB, Debian, Chipsee display: Tkinter gives error

2016-04-20 Thread David Good
Hi Harke,

X11 is the X window system rev 11.  It's the most basic graphics layer on a
desktop system.  By itself, it just allows you to create graphical windows,
but doesn't manage them in any way.  That's where LXDE comes in.  LXDE sits
on top of X11 and provides useful "desktop user" type features like window
management, a clipboard for copy and paste between applications, a program
menu launcher, etc...

About starting your program, you really shouldn't need to have LXDE.  You
should be able to to add your "python my_program.py" to a .xinitrc file and
get what you are looking for.  This uses X11 at its most basic level,
without providing "start menu" etc.

https://wiki.debian.org/Xinitrc
http://blog.falconindy.com/articles/back-to-basics-with-x-and-systemd.html
https://wiki.gentoo.org/wiki/X_without_Display_Manager

After poking around a bit, I found that you might like a package called
nodm.
https://github.com/spanezz/nodm
https://packages.debian.org/jessie/nodm
http://jeffhoogland.blogspot.com/2011/12/howto-get-right-to-x-with-no-display.html

I've not used it, but now that I've seen this, I will give it a try myself!

I hope this helps!

--David


On Mon, Apr 4, 2016 at 1:53 PM, Harke Smits  wrote:

> 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 
> 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 > > 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 
 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 

Re: [beagleboard] Re: BBB, Debian, Chipsee display: Tkinter gives error

2016-04-04 Thread Harke Smits
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  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 
> 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 
>>> 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.


Re: [beagleboard] Re: BBB, Debian, Chipsee display: Tkinter gives error

2016-03-26 Thread David Good
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 
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 
>> 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 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.


[beagleboard] Re: BBB, Debian, Chipsee display: Tkinter gives error

2016-03-26 Thread John Baker
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 
> 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.