martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
MIT License
848 stars 105 forks source link

Is it possible to run dvtm on FreeBSD (with a sane terminal) ? #79

Open rsyncnet opened 6 years ago

rsyncnet commented 6 years ago

I have never had any problems running dvtm on older FreeBSD installations. It "just works" and I see 'rxvt' defined as my TERM variable. This is dvtm 0.5.2 on FreeBSD 7.x.

Now, however, on an up to date FreeBSD 11.0 and dvtm 0.15, I cannot run dvtm without this error:

csh: cannot open /etc/termcap csh: using dumb terminal settings

... and the result is that dvtm works, but instead of the nice extended ASCII lines, my window borders are all made of 'q' and 'x' characters and none of my ncurses commands will run, can't run vi, etc. ("vi: No terminal database found")

My best attempt at solving this was to convert dvtm.info into termcap format:

infotocap dvtm.info >> /etc/termcap

... and then rebuild the termcap database:

cap_mkdb /etc/termcap

... which completes without errors, but does not solve the problem or change the behavior at all. Since FreeBSD uses termcap, converting terminfo to termcap loses some things because of the 1023 byte limit.

Alternatively:

I have set BOTH my TERM and DVTM_TERM environment variables to xterm-256color and executed dvtm with the following command line:

TERM='xterm-256color' DVTM_TERM='xterm-256color' dvtm

.... but nothing changed. Still "cannot open /etc/termcap".

How may I run dvtm on FreeBSD ?

ghost commented 6 years ago

I remember running it on FreeBSD once, so it is possible. As soon as I have a FreeBSD vm setup I'll try and tell how it goes...

rsyncnet commented 6 years ago

Thank you - appreciated. I also had dvtm working "properly" on older versions of FreeBSD (7 and 8, I think) but 10 and 11 break in the way I described.

On Thu, 17 May 2018, Josuah Demangeon?? wrote:

I remember running it on FreeBSD once, so it is possible. As soon as I have a FreeBSD vm setup I'll try and tell how it goes...

? You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.[AFXYHxcMLVPy07DjYR8oq50GGWJeOmkPks5tzZ6KgaJpZM4RO1z3.gif]

rsyncnet commented 6 years ago

@josuah

I wonder if you ever had a chance to test this in a FreeBSD VM ?

Thanks.

ghost commented 6 years ago

To compile it I need to devine SIGWINCH to whatever (we may have to tinker with -D_BSD_SOURCE and alike to get it).

Then I can start dvtm right away: ./dvtm

I now have what I probably had the last time : I have to define TERM to something in order to start curses-based programs. So it does not solve the issue.

Note that no terminfo/cap have been used at all so far.

ghost commented 6 years ago

Ah, I figured out : You still need the path to the termcap.db is /usr/share/misc/termcap.db and not /etc/termcap.db. I'll send a patche to improve portability...