-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels