My colored tcsh prompt does not appear so on GNU Screen but tmux

Hi,

I've recently trying sysutils/screen and i had noticed that my colored tcsh prompt that was working in sysutils/tmux alternative, doesn't work in sysutils/screen, i couldn't get over it by googling it, anyone knows how to do it here? Thanks in advance.

~/.cshrc
Code:
if ($?prompt) then
        # set prompt = "%N@%m:%~ %# "
        set prompt="${green}%n${end}${yellow}@${red}%m${cyan} %~ ${end}%% "
        set promptchars = "%#"
 

Attachments

  • 2025-07-30-111554_1920x1080_scrot.png
    2025-07-30-111554_1920x1080_scrot.png
    49.3 KB · Views: 146
screen sets its own TERM env and adds a TERMCAP env var that my confuse your terminal emulator
you may try another terminal emulator or reset TERM to its default value (xterm256-color?)
 
It worked on xterm but not on my current terminal program: suckless st.

Tried with: <st or xterm> -e screen -T xterm-256color
 

Attachments

  • 2025-07-30-132859_1920x1080_scrot.png
    2025-07-30-132859_1920x1080_scrot.png
    34.8 KB · Views: 143
If you testing terminal as well, give a try to wezterm and its wit multiplexer built in. and you will have 1 config instead of multiple ones.
You can build from source. you can split like screen and tmux.
 
It worked on xterm but not on my current terminal program: suckless st.
How did you get your st? Did you build it from ports/packages or cloned the original repo and installed it yourself (with custom patches perhaps)? st provides st.info with 'st-256color' entry that can be installed via tic -sx st.info. Maybe you should try to set TERM=st-256color? Although I'm not sure that this is where the problem is...
 
How did you get your st? Did you build it from ports/packages or cloned the original repo and installed it yourself (with custom patches perhaps)?
From ports with my patches.

Maybe you should try to set TERM=st-256color?
I've just tried starting screen with -T st-256color but still no colors on my prompt.

Although I'm not sure that this is where the problem is...
Me either, i may reconsider staying on tmux.

st provides st.info with 'st-256color' entry that can be installed via tic -sx st.info.
Termcap entries are already installed for me.
Code:
# Termcap for st terminal taken from the st-0.8 sources
st|simpleterm:\
        :sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:ts=\E]0;:\
st-256color|simpleterm with 256 colors:\
        :oc=\E]104\007:tc=st:
st-meta|simpleterm with meta key:\
        :rs=\E[4l\E>\E[?1034h:tc=st:
st-meta-256color|simpleterm with meta key and 256 colors:\
        :rs=\E[4l\E>\E[?1034h:tc=st-256color:
        :rc=\E8:sc=\E7:se=\E[27m:sf=\n:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
        :se=\E[27m:sf=\n:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
 
If you testing terminal as well, give a try to wezterm and its wit multiplexer built in. and you will have 1 config instead of multiple ones.
You can build from source. you can split like screen and tmux.
Thanks for suggestion but I really like x11/sterm and want to stay on it.
 
Back
Top