Ask / Submit

Terminal and curses-based menus

asked 2018-01-08 17:11:49 +0200

DaveRo gravatar image

updated 2018-01-11 14:50:09 +0200

I have a script with uses 'dialog' curses menus. It runs on Debian (actually Armbian) over SSH.
Here is an example screen in connectbot on Android:
Here it is running in terminal on my Jolla C:

As you can see, what should be an expanse of blue is mainly transparent. And some areas of grey inside the menu box also. Any idea why?

There's no difference, BTW, between the data behind the short album names - like 'Ocre' - and the longer ones - like 'The Great Dark Water'. It seems that a consecutive series of about 15 blank coloured spaces comes out transparent.

One problem using these menus is that unless I limit them to the top half of the display then they slide out of view as soon as I hit a key - usually it's cursor down. I only need cursor up/down and numerics to operate it - and later mplayer keys like p q > < and a few others.

Could I build my own one-row vkb and get terminal to use it?

Edited to add:

Having learned about ANSI codes and xterm mode, and poked about in the code for fingerterm (though I don't know C) I think this a bug. I think that curses must send a code for 'insert n blanks' whenever there are more than 15. Terminal does that, but forgets the background colour. I suspect that's because it doesn't select 'overwrite mode'.

edit retag flag offensive close delete


Can you provide a small shell script using ncurse highlighting the problem? With it I can try to give a look what is wrong with fingerterm.

Damien Caliste ( 2018-01-11 14:58:18 +0200 )edit

Hi Damien

You can use the script that the screenshots come from:

Just set music_dir in line 7 to the top of a directory tree like I describe here:!topic/alt.os.linux.suse/oL_FBlyoWvQ
or any similar structure

DaveRo ( 2018-01-11 16:08:36 +0200 )edit

Ok, got it, but I guess I need to compile dialog? Or is it available somewhere?

Damien Caliste ( 2018-01-11 17:23:45 +0200 )edit

I installed in on debian/armbian:
david@bananapi:~$ dpkg -l dialog
ii dialog 1.3-20160828-2 armhf Displays user-friendly dialog boxes from shell scripts

DaveRo ( 2018-01-11 17:33:25 +0200 )edit

...but you don't need it on Jolla. You can install and run it on any Linux box and SSH from Jolla.

DaveRo ( 2018-01-11 17:35:43 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-01-17 11:46:25 +0200

I've started a MR upstream for this. Actually, as explained in the MR, it is a bit more trickier than expected.

The current commits are correcting the rendering issues of default background colour inside the dialog but are not properly solving the issue of empty lines and dialog end of lines.

Feel free to comment here or in GitLab about it.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools



Asked: 2018-01-08 17:11:49 +0200

Seen: 352 times

Last updated: Jan 17 '18