We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

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:
https://www.cjoint.com/data/HAioKvPEnz8_Screenshot-20180108-140316.png
Here it is running in terminal on my Jolla C:
https://www.cjoint.com/data/HAioL3Qy3z8_Screenshot-20180108-001.png

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

Comments

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:
https://gist.github.com/revad/c3839f8dbf5a3b7661f7f0fe5af61047

Just set music_dir in line 7 to the top of a directory tree like I describe here:
https://groups.google.com/forum/m/#!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
2

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

Follow
3 followers

Stats

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

Seen: 500 times

Last updated: Jan 17 '18