Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!metran!jay From: jay@metran.UUCP (Jay Ts) Newsgroups: comp.unix.i386 Subject: Re: color for 386/ix Summary: Here's a kludge Keywords: color consoles Message-ID: <208@metran.UUCP> Date: 5 Mar 90 06:43:05 GMT References: <511241@nstar.UUCP> Organization: Metran Technology, Clearwater FL Lines: 43 [1;37;45m In article <511241@nstar.UUCP>, larry@nstar.UUCP (Larry Snyder) writes: > [...] > As most of you know, I am running 386/ix. [...] > I received a "setcolor" utility for 386 unix and it works until > I bring up vi - in which case the console is reset to white on > black. If I run this utility again, the set up color remains ^^^^^ [1;37;44m Actually, *grey* on black. Normally, you get white by hiliting grey. [1;37;45m > active again until I run one of several system utilities or > applications in which case the console is reset. Is there > any way to set and keep the console in a specific color combination? [1;37;44m What I am now doing to try to achieve this is a horrible kludge, but since I haven't seen anyone post a better method, here it is. What I do is simply run a setcolor-like command from my crontab, which looks like this: (look at it with vi, to show escape char's) --------------------- start of crontab entry --------------------- * * * * * echo -n '[1;37;44m' >/dev/console; echo -n '[1;32;44m' >/dev/vt01; echo -n '[1;37;43m' >/dev/vt02; echo -n '[1;37;45m' >/dev/vt03; echo -n '[1;33;45m' >/dev/vt04; --------------------- end of crontab entry ----------------------- [1;37;44m (sorry if this messes up your screen...) Basically, I am just printing the necessary escape sequences -- see display(7) in the 386/ix User's/System Administrator's Reference Manual -- to the console and virtual terminals once each minute. It's rather nice getting white (not grey) text, and a different color combination for each virtual screen, so I know which one I'm using. [1;32;44m Now, this method doesn't *really* work, it just comes close. I just use it because I'm desperate for color text. If vi messes up the colors, it will take up to a minute for them to be reset, and you still have to press CTRL-L to refresh the whole screen. vi is most annoying; it resets the colors upon startup and each time it prints an error message! [1;37;43m OK, now that I have made a fool of myself by posting this silliness, someone *please* tell us of a better way! [1;37;44m Jay Ts uunet!metran!jay [0m [5;41;33;1mflames[0m to [1m/dev/null [0m