Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to change the background color an an xterm window without clearing the screen? I want to have a prompt that changes the entire screen's color, but I don't want to clear the screen

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

For instance like this: echo -e '\e]11;rgb:cc/ff/cc\a' (yields a light green background).

For more possibilities, check the xterm control sequences documentation.

share|improve this answer
    
Do you mean \033 for \e? –  vy32 May 8 '13 at 22:12
    
yes. \e is escape (^[, \033), \a is bell (^G, \007) –  Uwe May 8 '13 at 22:41
    
So why do you want a bell? –  vy32 May 9 '13 at 0:36
    
According to the document I cited, the control sequence is <escape>]11; + color name + <bell>. –  Uwe May 9 '13 at 6:25
    
Ah, okay. Thanks. Unfortunately that sequence doesn't work on my Apple Terminal client, which is supposed to implement xterm sequences but I guess doesn't. –  vy32 May 9 '13 at 12:14
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.