[TAG] Colouring $PS1...
Kapil Hari Paranjape
kapil at imsc.res.in
Thu Jun 15 15:04:36 MSD 2006
Hello,
On Thu, 15 Jun 2006, Mahesh Aravind wrote:
> Here's some more that I'll be (or someone else'll be) using
>
> s/o == Significant Other (*not* son of)
Why not "son of"?
Anyway, you seem to be missing the point. It is generally up to the
communicator (in this case you) to ensure that abbreviations that
you use are known to the communicatees (in this case not just Thomas
or TAG but possibly other readers of LG).
Otherwise it is rather like sending an ogg file to someone who uses
a Macintosh or a Word file to me. The recipient *might* be able to
figure out what you are trying to say---but *might* press the delete
button instead.
> Arrgh! I don't seem to get my idea thru to you. See, when you feel like
> creating an /etc/issue that'll emit your '\l' getty escape codes using
> so-called hard-coded escape colour codes like "^[[33;1m\l^[[0m", how can tput
> come to the rescue? Like you code up a shell script to o/p (err.. output,
> sorry) a /tmp/issue that'll have correct escape codes querried form the
> terminfo database.
As Ben pointed out you can indeed do that. For example, you can have
/etc/default/issue which is used/parsed by /etc/init.d/generate_issue
to generate the "real" /etc/issue by using the terminal settings
appropriate to /dev/console (which may or may not be a serial
console). Beware that this /etc/issue will break on some terminals
that are "getty"-ed via serial line.
> Can tput escape codes be interpretted by getty?
That "getty" only understands escape codes in /etc/issue instead of a
generic description like that given by terminfo or slang is surely a
fault of "getty"! Hack "getty" to fix this problem.
> useful, in the sense, anyone who feels like colouring their /etc/issue or
> /etc/motd can look up this script and decide on what to do (and what not to do)
As far as "motd" is concerned there is no short cut. You need to hack
at "login" itself to make sure that it "knows" terminfo or slang in
order that it can put out a colourful message of the day regardless
of which terminal a user logs in from.
> Thanks for ur time...
Lovely. The beginning of time itself. Indeed something to be grateful
for.
<flame-goggles-on-please>
Mahesh Aravind----brings to mind the picture of a bull trampling on a
lotus. That seems appropriate given the tenor of your recent postings.
<flame-goggles-off-please>
Regards,
Kapil.
--
More information about the TAG
mailing list