:: Re: [DNG] New behaviour under Devua…
Forside
Slet denne besked
Besvar denne besked
Skribent: Miroslav Rovis
Dato:  
Til: Didier Kryn, Renaud (Ron) OLGIATI
CC: dng
Emne: Re: [DNG] New behaviour under Devuan.
Also thanks for the quick replies, one from Renaud, in other emails.

But... (see below)...

On 170923-16:24+0200, Didier Kryn wrote:
> Le 23/09/2017 à 15:50, Miroslav Rovis a écrit :
> > On 170923-19:01+1000, Erik Christiansen wrote:
> > > On 23.09.17 10:15, Arnt Karlsen wrote:
> > > > ..I still miss and prefer the S.u.S.E.-5.2 way, root had a
> > > > nice red background color in xterms, fairly hard to miss.
> > > If the '#' and "root@hostname" escape the attention of a person
> > > entrusted with root privileges, then why not make the root prompt bright red:
> > >
> > > root@ratatosk:/home/erik# export PS1="\[\033[1;31m\]\u@\h:\W\$ \[\033[0;0m\]"
> > Useful. But in which file do you stick it, you didn't say? ~/.bashrc ?

...
> > Find this wrong notion engraved, (lets put it mildly), in the comment at line
> > 45 of:
> >
> > /etc/skel/.bashrc
> >

...
> > but it will be available in the www.mail-archives.com, right after the message
> > to which I'm replying:
> > Re: [DNG] New behaviour under Devuan.
> > https://www.mail-archive.com/dng@lists.dyne.org/msg17863.html
> >
> > if I'm not mistaken.

I wasn't much mistaken :-) It's relatively close to there:

[ same title as this email ]
https://www.mail-archive.com/dng@lists.dyne.org/msg17871.html
and the _bashrc.gz is at:
https://www.mail-archive.com/dng@lists.dyne.org/msg17871/_bashrc.gz
( whoever runs Mail-Archive.COM, does a good job )

(we're not at the "But... " yet :-) )
> >

...
> > 46c46
> > < #force_color_prompt=yes
> > ---
> > > force_color_prompt=yes
> > 113a114,124
> > [...]
> >
> > it appears that I set:
> > force_color_prompt=yes
> > in my ~/.bashrc . And that actually gives me color'ed mr@gdOv:~$ (I'm not an
> > expert as I often admit.)
>
>     I always use color, as you. The statement that prompt is more important
> than command output is just plain wrong. I use the same color as you (green
> for me and red for root), plus other fancy colours for other system
> usernames (eg www-data). It is very important also to remind you when you
> are in a chroot. Here is my prompt for root (note the color list in the
> comment):

>
> ----------------------------
> if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
>     debian_chroot=$(cat /etc/debian_chroot)
> fi

>
> # set a fancy prompt (non-color, unless we know we "want" color)
> # \[\033[01;XXm\] changes the color
> # with XX= 30->black-bold, 31->red, 32->green, 33->yellow, 34->blue,
> 35->cyan
> # and  \[\033[00m\] to return to the default color
> case "$TERM" in
> xterm*)
> PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
> '
>     ;;
> *)
>     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
>     ;;
> esac
> ----------------------------

>
>     Cheers.
>                                 Didier


Thanks!

But I'll need to take a deep breath to figure out the nice Bash lines that you
sent to the list. :-)

Anybody got a quick tips page somewhere to find the exact color codes? Else I'm
out of the discussion for now. Too much effort... (and other work awaiting me,
I'm not lazy, but resources of mind energy not limitless, this has started
feeling like mind building exercize --compared to body building--...).

Regards!
--
Miroslav Rovis
Zagreb, Croatia
https://www.CroatiaFidelis.hr