I 'm learning embedded Linux with a BeagleBone. This time I'm using my Windows Desktop as the screen for my board.
Graphic Programs on a headless board. |
XWindow and Preparation of the Windows PC
I'm going to run applications on the BB. These applications want to show a window and graphics.
My BB doesn't have a screen. It will direct the graphics to my Windows laptop.
The activity doesn't require any software installation on the BB. Everything is there.
You have to run an xwindow server on your PC though - a program that will receive the graphics from the BB and draw them on the Windows desktop.
I'm using Cygwin for that. Install the latest version.
There's one change to the default install that you have to do on the 'Select Packages' screen.
Change X11 from Default to Install.
Then let the installation rip - this is a good time to do a long household chore because the first download of Cygwin takes a long time.
I have selected to create the Start Menu icons at the end of the install, so that I get an entry in the Start menu for the xwindow server.
After installation, you can start the Cygwin service in several ways. The easiest is to select the XWin Server program from your Start menu.
You get two new icons in the Tray. The first one - the Cygwin/XServer icon - lets you set preferences on how the xwindow canvas appears on your desktop.
We will not use that in this session. We leave everything as is.
The green icon is a menu that allows you to run a set of linux graphic applications locally on your Windows computer.
We'll use that to start a terminal session. From there we'll contact our BB and kick off graphical apps.
To do that, right-click on the X applications menu icon. Then select System Tools -> XTerm.
The xterm window pops up on your desktop. And that's the last piece of action that's executed on your computer.
You can spot that because the prompt shows my computer's name. It's a local Cygwin linux session.
In the next section, we connect to the BB and start shooting off graphic programs.
Connect to BeagleBone and Run Graphic Programs
Everything is now ready to establish the graphic link between BB and your PC, and run a few graphic applications.
Up until now, we were working on a Cygwin linux session on the PC. After the next step, we're in a linux session on the BB Debian - almost similar as when you go via PuTTY.
In the xterm window, secure shell into your BB. Use the -XY options to allow the BB to tunnel the graphic commands back to your PC xwindow server.
ssh -XY debian@192.168.7.2
Enter the password of user debian. You see that we have landed in our bb linux session, because the prompt changes to debian@beaglebone.
You're now ready to run graphic programs. There are a number of them installed in the /usr/bin/ folder of Debian.
Let's start with the test program xlogo.
That one is typically used to see if everything is set up right.
Start it by running this command on the prompt (the & after the command takes care that linux kicks off the program and returns back to the prompt without waiting for the app to finish:
xlogo &
If you see a small window popping up on your Windows desktop, you've got success!
Now go on and try a few of the other pre-installed applications:
xcalc & xterm & xclock & xmessage "Hello, world!" & xedit &
This is different than running a Desktop Environment. We're running individual applications here. You don't have a typical KDE, GNOME, Xfce, LXDE, ... experience.
Nothing stops you to install any of these windowing flavours on your BB and run that desktop environment on your Windows screen. It works - but you'll have to do that install.
Have fun!
BeagleBone - First Little Checks |
BeagleBone - Cross Compile c++ on Windows |
BeagleBone - Show XWindows Graphic Apps on Windows Desktop |
Top Comments