"WARNING: terminal is not fully functional" when elevate privileges with opendoas #692

Closed
opened 5 months ago by langtudeplao · 8 comments

After updating to 1.9.0 release, some commands are not executed properly when run with doas.

E.g.
$ doas systemctl status bluetooth
Output: "WARNING: terminal is not fully functional"
$ doas vi /path/to/file
Output: file is not displayed properly, only the first line of file is displayed
$ doas dmesg
Output: is not colorized

These problems only happen after updating to 1.9.0. I'm using sway.

// Thank you for this awesome terminal emulator.

After updating to 1.9.0 release, some commands are not executed properly when run with doas. E.g. $ doas systemctl status bluetooth Output: "WARNING: terminal is not fully functional" $ doas vi /path/to/file Output: file is not displayed properly, only the first line of file is displayed $ doas dmesg Output: is not colorized These problems only happen after updating to 1.9.0. I'm using sway. // Thank you for this awesome terminal emulator.

This is most likely because doas doesn't inherit TERMINFO from the user environment and foot's terminfo is installed in a non-standard location since 1.9.0. See also #673 for background.

There are multiple possible workarounds: You could teach doas to inherit TERMINFO or install foot's terminfo in the standard location manually, for example.

This is most likely because `doas` doesn't inherit `TERMINFO` from the user environment and foot's terminfo is installed in a non-standard location since 1.9.0. See also #673 for background. There are multiple possible workarounds: You could teach doas to inherit `TERMINFO` or install foot's terminfo in the standard location manually, for example.
Owner

I'm not familiar with doas, but sounds like this: #691

Note that once the next ncurses release is out, this will be a much much smaller problem, since we'll then gracefully fall back to its version of foot's terminfo.

I'm not familiar with doas, but sounds like this: https://codeberg.org/dnkl/foot/issues/691 Note that once the next ncurses release is out, this will be a much much smaller problem, since we'll then gracefully fall back to its version of foot's terminfo.
Owner

I will also happily add information on how to workaround this with doas to the man pages, just like sudo and ssh had already been documented.

I just need someone to tell me what the workaround is :)

I will also happily add information on how to workaround this with doas to the man pages, just like sudo and ssh had already been documented. I just need someone to tell me what the workaround is :)
Poster

Thank both of you for godspeed answers. Tbh, I have no idea how to get that workaround. Either @sterni provides a more detailed instruction or I will do my own search based on his/her suggestions. Knowing the cause and there are solutions out there, feel free to close my issue.

Thank both of you for godspeed answers. Tbh, I have no idea how to get that workaround. Either @sterni provides a more detailed instruction or I will do my own search based on his/her suggestions. Knowing the cause and there are solutions out there, feel free to close my issue.
Owner
https://man.openbsd.org/doas.conf.5#setenv looks right
Poster

@dnkl You're right. I never use this function before.
Setting: permit setenv { -ENV TERMINFO=/usr/share/foot/terminfo } :wheel
solve the problem. Thanks a ton.

@dnkl You're right. I never use this function before. Setting: permit setenv { -ENV TERMINFO=/usr/share/foot/terminfo } :wheel solve the problem. Thanks a ton.
langtudeplao closed this issue 5 months ago
Owner

Thanks for the feedback!

One more question if I may; does it also work with { -ENV TERMINFO }? I.e without assigning to it?

Thanks for the feedback! One more question if I may; does it also work with { -ENV TERMINFO }? I.e without assigning to it?
Poster

Yes, it works. Great, now my favorite terminal emu is back to action.

Yes, it works. Great, now my favorite terminal emu is back to action.
dnkl added the
doc
label 5 months ago
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.