[Gambas-user] issue trying to use of fbi command via SHELL command on non X terminal running under ncurses

Tobias Boege taboege at gmail.com
Sat Sep 14 15:15:41 CEST 2019


On Sat, 14 Sep 2019, KKing wrote:
> I have a script that invokes fbi and displays a graphic aok from console.
> 
> If I try to shell that script the screen goes blank, the quit key from fbi
> fails to respond, it appears not possible to switch into another console
> (i.e. tty2) I end up Ctrl+Alt+Del.
> 
> nothing apparent in syslog etc.
> 
> have trapped output of fbi to a log, it has a "normal" line about font it
> uses and then
> 
>     map: vt01 => fb0
> 
> nothing else.
> 
> Any thoughts on what the issue(s) could be and or any tips on how to debug
> further?
> 
> NB all this is in NON  X environment running gambas ncurses.
> 

I don't know fbi, but what you describe sounds like:

  - fbi takes control of the framebuffer to display an image,
    as it is supposed to, but then somehow fails and doesn't
    quit(?),

  - because it is your Gambas process attached to the terminal,
    keypresses do not go through to fbi,

  - while you have multiple VTs, you only have one framebuffer,
    so whatever hogs that can prevent you from seeing anything.

I'm not sure at all this is how it is because switching VT should be
possible at all times and would clear the framebuffer IIRC, so fbi
would have to be drawing to the framebuffer constantly to create a
situation where your screen remains blank...?

But to debug further (assuming that you already know that your script
works when not called from Gambas), you should take a reference of the
Process that is created when you shell out to fbi and set a Timer to
always kill it after 5 seconds. (Or make a keyboard shortcut in your
application to do that -- as your Gambas process should still be able
to receive keyboard input.)

As an aside, I've lived in an X-less installation for one or two years
(but I used fbv instead of fbi). During that time I wrote gb.ncurses :-)

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list