[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
Sun Sep 15 14:36:38 CEST 2019


On Sun, 15 Sep 2019, KKing wrote:
> thanks Tobi,
> <<
> assuming that you already know that your script works when not called from
> Gambas
> >>
> it does
> 
> <<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.>>
> I just tried that, and seemingly no effect ... but I need to probably create
> a stripped down standalone test as the timer was not firing in the IDE
> either, not sure if maybe ncurses screen.read might be interfering?
> 

You mean Window.Read? Yes, that will block the entire process waiting
for input and no Gambas timers will fire. You can either use the Timeout
argument to Window.Read (in milliseconds) to get out of that every once
in a while or handle input using the Window_Read events, which I strongly
recommend.

> <<
> Or make a keyboard shortcut in your application to do that -- as your Gambas
> process should still be able to receive keyboard input.)
> >>
> I'll need to look into how you set up a keyboard shortcut?
> 

There is no specific API for keyboard shortcuts. I meant you just grab
input (either from Window.Read or from the Read event, whatever model
your application uses) and interpret e.g. "K" as "kill that process now".
In most applications you have some dispatch table of keystrokes to
program actions already.

> <<
> but I used fbv instead of fbi
> >>
> fbv does not appear to be a debian package?
> Currently based around debian 9 and trying to stick to packages available
> from std repo.
> If I can find true source I may trying to compile just to see if it makes a
> difference in my case.
> Do you know if fbv also displays pdf?
> 

fbv is a tiny program you can find on github. It seems to have strictly
less features than fbi and probably works the same for all it does.
I have no idea if it's still maintained or if it needs maintenance.
It can't read PDFs. I had fb... -pdf for that.

Regards,
Tobi

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


More information about the User mailing list