[BBB] Accessing display from serial console login

I’ve been using linux for years and never tried to do this. Does anyone know if it is possible, and if so how?
I have a display connected to HDMI and the gnome desktop comes up fine (latest Angstrom image, Beaglebone Black).
I’d rather not hassle with a USB hub and connect a keyboard and mouse (I already have a webcam connected via USB).
I interface to the BBB with a serial console login. Is there a way to launch X applications from the serial console and get them to display on the HDMI monitor?
I’ve tried:

(Raw:616): Gtk-WARNING **: cannot open display: export DISPLAY=localhost:0.0 (Raw:602): Gtk-WARNING **: cannot open display: localhost:0.0 > echo `hostname` beaglebone > export DISPLAY=beaglebone:0.0 (Raw:602): Gtk-WARNING **: cannot open display: beaglebone:0.0

Also, since I never plan to wiggle a mouse, how do I disable the screensaver function (display goes to sleep)?

Thanks,
Jim

I've been using linux for years and never tried to do this. Does
anyone know if it is possible, and if so how? I have a display
connected to HDMI and the gnome desktop comes up fine (latest
Angstrom image, Beaglebone Black). I'd rather not hassle with a USB
hub and connect a keyboard and mouse (I already have a webcam
connected via USB). I interface to the BBB with a serial console
login. Is there a way to launch X applications from the serial
console and get them to display on the HDMI monitor? I've tried:

<launch X application> (Raw:616): Gtk-WARNING **: cannot open
display: export DISPLAY=localhost:0.0 <launch X application>
(Raw:602): Gtk-WARNING **: cannot open display: localhost:0.0 bbb>
echo `hostname` beaglebone bbb> export DISPLAY=beaglebone:0.0
<launch X application> (Raw:602): Gtk-WARNING **: cannot open
display: beaglebone:0.0

I've run into that as well, and haven't figured it out. I saw
something that implied I should "export DISPLAY=:0", but I haven't
tried it yet. I did pretty much everything you list above and had the
same results.

Also, since I never plan to wiggle a mouse, how do I disable the
screensaver function (display goes to sleep)?

If you hook up a mouse once, you can disable the display power
management in gnome and it will 'stick'. There's probably some
magical command line incantation that would make this work without
doing it through the gui, but I'm not familiar enough with gnome to
know how. :frowning:

Alternately, you can "echo 0 > /sys/class/graphics/fb0/blank" to
'kick' the display every once in a while and get it to turn back on.

Note that if you haven't turned off blanking and you don't have a
mouse or keyboard plugged into the 'Bone, it will go into blanking
IMMEDIATELY after boot and it will generally look like HDMI is broken.

- --
Charles Steinkuehler
charles@steinkuehler.net

What you want is a normal desktop with a “remote” keyboard and mouse,
and I’m not sure how to do that. I access the BBB from a network
connection, using VNC.

I got a minimal X desktop displayed via a VNC server by logging into the
BBB with ssh and running the following script:

#!/bin/bash

Start a vnc server.

export DISPLAY=:1
xinit – /usr/bin/Xvfb :1 -screen 0 1024x768x24 &
x11vnc -display :1 &

with ~/.xinitrc being:

~/.xinitrc

xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
twm

Then a VNC viewer on the remote machine gets you an X desktop with a couple
of xterms and twm (a window manager); there’s no reason why the same setup
can’t start a standard desktop. It’s not using any hardware acceleration,
so even with Xterms it’s a bit slow, but I haven’t yet had time to sort out
a better configuration. (Be aware that the setup has less than no security.)

Good luck - Will

Here’s an update on this:

On a regular linux box, if I do an X login (gnome) using the main display, then type ‘echo $DISPLAY’ in a terminal window, I get “:0.0”. Then if I remote login via ssh, or any non-X method, then 'export DISPLAY=":0.0", then ‘xterm &’, an xterm appears on the main display.
If I do the same thing on the Angstrom build, connect HDMI monitor, keyboard, and mouse, “echo $DISPLAY” also returns “:0.0”. From the serial console login, 'export DISPLAY=":0.0", launch X application, I get “Gtk-WARNING **: cannot open display: :0.0”.

I noticed that in the ubuntu experiment, I had to be the same user in both the X session and the non-X session for this to work. In Angstrom, I am root on both. I tried a regular user account (xuser comes pre-configured), a lot of things break in the gnome session so I didn’t get very far at all.

Also, even natively using the gnome session with display, kerboard, and mouse; basic X things don’t work:
‘xterm &’ gives me an all white window, a message on the window I launched it from about a locale error and can’t find input method, and I have to kill the xterm process from the serial console login to bring the X-session back to life.
And MOST IMPORTANTLY, my openCV application does something similar, opens a blank white window and hangs. This is the main thing I bought the BBB for!

Thanks,
Jim

You'll probably have a lot better luck with something like Debian or
Ubuntu. It's straight-forward to run RobertCNelson's console Debian
and Ubuntu images and add LXDE (or Gnome/KDE if you really want) for a
much more conventional Linux X11 experience:

http://elinux.org/BeagleBoardDebian
http://elinux.org/BeagleBoardUbuntu

- --
Charles Steinkuehler
charles@steinkuehler.net