lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master 4eca5fa 1/3: Suppress a redhat nuisance


From: Greg Chicares
Subject: Re: [lmi] [lmi-commits] master 4eca5fa 1/3: Suppress a redhat nuisance
Date: Fri, 7 Feb 2020 12:38:51 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0

On 2020-02-05 15:24, Vadim Zeitlin wrote:
> On Wed,  5 Feb 2020 10:16:08 -0500 (EST) Greg Chicares <address@hidden> wrote:
[...]
> GC> +# Suppress a nuisance: rh-based distributions provide a default
> GC> +# zsh logout file that clears the screen.
> GC> +sed -e'/^[^#]/s/^/# SUPPRESSED # /' -i /srv/chroot/centos7lmi/etc/zlogout
> 
>  Just in case it can be useful: you could also add the following line to
> your ~/.zlogout file (creating it if necessary):
> 
>       unsetopt GLOBAL_RCS
> 
>  This would inhibit /etc/zlogout (or /etc/zsh/zlogout or whatever) from
> being read.
> 
>  Of course, you could also unset GLOBAL_RCS earlier if you don't want to
> use /etc/z{profile,shrc,login} neither, but doing it in ~/.zlogout is the
> least disruptive way to skip /etc/zlogout.

Here's an emphatic variation:

  sh -c 'exec env -i TERM=$TERM /bin/zsh -o NO_GLOBAL_RCS'

I considered making that the first line of ~/.bash_profile in lieu of
  exec /bin/zsh -l
but I fear that it might be too extreme. I certainly needed to pass
$TERM through. I suspect I might also need things like
  XDG_SESSION_ID
  USER
  LOGNAME
  HOME
which are missing after the 'env -i' invocation above.

It looks like redhat has added a lot of superfluous stuff in their
/etc/z* startup files, but I don't want to spend time going through
everything in detail. For example, when in /etc/zprofile I see:

    #  Make /etc/profile happier, and have possible ~/.zshenv options like
    # NOMATCH ignored.
    #
    emulate -L ksh
...
    source /etc/profile

I content myself with running 'emulate' at the command line to make
sure that ksh emulation was indeed localized in that file.

Instead of trying to suppress zsh startup files, I'll just clean up
after them by unsetting variables that seem clearly needless.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]