Skip to content

terminfo database #682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DSJ2 opened this issue Mar 7, 2025 · 3 comments
Open

terminfo database #682

DSJ2 opened this issue Mar 7, 2025 · 3 comments

Comments

@DSJ2
Copy link

DSJ2 commented Mar 7, 2025

When I ssh to an XCP host from inside screen on a Fedora41 desktop, I get

-bash: [: -ge: unary operator expected

and the terminal colors don't work.


I've tracked it down to this test

[ $(tput colors 2>/dev/null) -ge 8 ]

in /etc/profile.d/xcp-ng-prompt.sh


Here is a log of a session that shows the problem:

mydesktop:~$ ssh lab1
Last login: Fri Mar  7 09:48:17 2025 from mydesktop
-bash: [: -ge: unary operator expected

# echo $TERM
TERM=screen.xterm-256color

# tput colors
tput: unknown terminal "screen.xterm-256color"

# ls /usr/share/terminfo/s/
screen           screen.konsole  screen.teraterm       simpleterm   sun1
screen-16color   screen.linux    screen.vte            st           sun2
screen-256color  screen.mlterm   screen.xterm-new      st-16color
screen.Eterm     screen.mrxvt    screen.xterm-r6       st-256color
screen.gnome     screen.rxvt     screen.xterm-xfree86  sun

# export TERM=screen-256color

# tput colors
256
@stormi
Copy link
Member

stormi commented Mar 12, 2025

Thanks for the report. Forwarding to the team.

@stormi
Copy link
Member

stormi commented Mar 12, 2025

The root cause is in /etc/profile.d/xcp-ng-prompt.sh.

@ydirson
Copy link
Contributor

ydirson commented Mar 14, 2025

Adding double quotes around $(...) should fix the syntax error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants