I started a new thread because the thread subject "7" Touch Screen Calibration" solved my problems.
The display is working great, now I want to display a simple interface with buttons. For that I am using Glade and GTK to create the button. But that is a window and so the BBB needs a window manager ( not a GUI just a manager ) so I loaded xinit ( apt-get install xinit).
Initially /etc/X11/xorg.conf is:
Identifier "Builtin Default fbdev Device 0"
Driver "modsetting"
With that setting when I run startx /usr/DonCode/part1-bin (my GTK file) the xserver closes without displaying anything and the log file shows 2 errors, the file modsetting.txt is the xserver log file. It sees the display as "Monitor name: Adafruit 600p"
So I change the xorg.conf to Driver "fbdev" and ran the same way but the screen goes blank for a second, then returns to the beaglebone prompt with "... lade :No such file or directory xini" with the rest of the line being off the display so I cannot read it. That log file is fbdev.txt.
Is there a specific setting your 7" display needs to run in Xorg? Or am I missing something else? This is a cool project for me. I learned a lot about Linux and the BBB so for. Good stuff for a resume!
Have a Blessed day!
Don
7" Touch Screen
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- DonTrustee
- Posts: 11
- Joined: Fri Apr 15, 2022 11:52 am
7" Touch Screen
- Attachments
-
- fbdev.txt
- (17.13 KiB) Downloaded 357 times
-
- modsetting.txt
- (23.18 KiB) Downloaded 362 times
- adafruit_support_mike
- Posts: 67909
- Joined: Thu Feb 11, 2010 2:51 pm
Re: 7" Touch Screen
That means you have a typo somewhere. The program you want is ‘xinit’No such file or directory xini
- DonTrustee
- Posts: 11
- Joined: Fri Apr 15, 2022 11:52 am
Re: 7" Touch Screen
No, there is more to it than that. As I said in my post, I run startx filename which is a front end to xinit. A cat of startx reveals its purpose:
#!/bin/sh
#
# This is just a sample implementation of a slightly less primitive
# interface than xinit. It looks for user .xinitrc and .xserverrc
# files, then system xinitrc and xserverrc files, else lets xinit choose
# its default. The system xinitrc should probably do things like check
# for .Xresources files and merge them in, start up a window manager,
# and pop a clock and several xterms.
#
# Site administrators are STRONGLY urged to write nicer versions.
#
The files xinitrc and xserverrc are on my machine.
I get the same results with either startx or xinit. There must be a setting xinit is reading for the display that is not right for the touchscreen. Do you know what settings are required for xinit to run on that display? This should be applicable to a pi board also as both BBB and pi are Linux.
Have a Blessed day!
Don
#!/bin/sh
#
# This is just a sample implementation of a slightly less primitive
# interface than xinit. It looks for user .xinitrc and .xserverrc
# files, then system xinitrc and xserverrc files, else lets xinit choose
# its default. The system xinitrc should probably do things like check
# for .Xresources files and merge them in, start up a window manager,
# and pop a clock and several xterms.
#
# Site administrators are STRONGLY urged to write nicer versions.
#
The files xinitrc and xserverrc are on my machine.
I get the same results with either startx or xinit. There must be a setting xinit is reading for the display that is not right for the touchscreen. Do you know what settings are required for xinit to run on that display? This should be applicable to a pi board also as both BBB and pi are Linux.
Have a Blessed day!
Don
- DonTrustee
- Posts: 11
- Joined: Fri Apr 15, 2022 11:52 am
Re: 7" Touch Screen
When I run openbox I get "failed to open the display from the DISPLAY environment variable". There is no DISPLAY var when I run the env command. Do I have to set up the DISPLAY variable for xinit to run also?
Have a Blessed day!
Don
Have a Blessed day!
Don
- adafruit_support_mike
- Posts: 67909
- Joined: Thu Feb 11, 2010 2:51 pm
Re: 7" Touch Screen
If X isn’t already running, ‘startx’ should tell ‘xinit’ to start running on the current machine’s primary display ‘localhost:0’ which is almost always shortened to just ‘:0’.
If you want to use another display, you tell ‘startx’ which one you want to use.. usually ‘:1’
‘startx’ is just a front-end for ‘xinit’, so take a look at the manpages:
https://linux.die.net/man/1/startx
https://linux.die.net/man/1/xinit
If you want to use another display, you tell ‘startx’ which one you want to use.. usually ‘:1’
‘startx’ is just a front-end for ‘xinit’, so take a look at the manpages:
https://linux.die.net/man/1/startx
https://linux.die.net/man/1/xinit
- DonTrustee
- Posts: 11
- Joined: Fri Apr 15, 2022 11:52 am
Re: 7" Touch Screen
Sorry for the double posts. I got it to work! Among other things I needed to be running, in my case, lxde gui. In the lxde gui you open a terminal and run the .bin file. My window pops up and executes my code. Thanks for your replies, I apologize for being a newby. Now I have to get the BBB to boot up in a production logo and begin to execute the code I write. Looking forward to embedded control with the BBB.
Have a Blessed day!
Don
Have a Blessed day!
Don
- adafruit_support_mike
- Posts: 67909
- Joined: Thu Feb 11, 2010 2:51 pm
Re: 7" Touch Screen
Glad to hear things are working. Happy hacking!
Please be positive and constructive with your questions and comments.