Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #222081

Re: Output from date command defaults to 12-hour in Buster.

From Nicolas George <george@nsup.org>
Newsgroups linux.debian.user
Subject Re: Output from date command defaults to 12-hour in Buster.
Date 2020-04-29 14:20 +0200
Message-ID <A0TR0-B8-9@gated-at.bofh.it> (permalink)
References <A0JRD-2s2-3@gated-at.bofh.it> <A0OeC-5s2-7@gated-at.bofh.it> <A0THk-xF-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Greg Wooledge (12020-04-29):
> The choice of .bashrc may be fine for GNOME users (hell, it may even be
> *mandatory* for GNOME users, because GNOME is user-unfriendly shit),
> but even then, it only affects commands that are launched from an
> interactive shell.
> 
> In order to take effect in commands that are launched by the window
> manager, or whatever, environment changes should be done much earlier
> in the session.
> 
> For shell logins, you would want to put the command(s) in ~/.profile or
> whatever your login shell's equivalent dot file is.
> 
> For GUI logins that are not GNOME, you can try setting up the environment
> in ~/.xsessionrc -- but note that your Desktop Environment (even if it's
> not GNOME) may overwrite whatever you try to set.

With a smarter shell than bash, there is a solution that works for all
these cases, and even a few others: ~/.zshenv will be called for all zsh
instances (and therefore needs to be very minimalistic, and preferably
set up to avoid overwriting explicit changes).

So it will take effect for login shell on a VC, remote login shell,
remote non-login shell (to set $PATH so that rsync finds
~/local/bin/rsync), programs launched by the WM if it uses $SHELL, even
GUI sessions if ~/.xsessionrc is #!/bin/zsh.

Mine starts with:

[[ "$ZSHENV_USER" == $UID-1 ]] && return
export ZSHENV_USER=$UID-1

And then it sets the environment up. Bonus point: if I change the 1 into
2, it even takes effect on all new shells, no need to re-log.

Regards,

-- 
  Nicolas George

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Output from date command defaults to 12-hour in Buster. "Martin McCormick" <martin.m@suddenlink.net> - 2020-04-29 03:40 +0200
  Re: Output from date command defaults to 12-hour in Buster. Roberto C. Sánchez <roberto@debian.org> - 2020-04-29 03:50 +0200
    Re: Output from date command defaults to 12-hour in Buster. Charles Curley <charlescurley@charlescurley.com> - 2020-04-29 07:00 +0200
      Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-29 13:50 +0200
        Re: Output from date command defaults to 12-hour in Buster. Nicolas George <george@nsup.org> - 2020-04-29 14:10 +0200
          Re: Output from date command defaults to 12-hour in Buster. Andrei POPESCU <andreimpopescu@gmail.com> - 2020-04-29 19:10 +0200
            Re: Output from date command defaults to 12-hour in Buster. Nicolas George <george@nsup.org> - 2020-04-29 19:20 +0200
              Re: Output from date command defaults to 12-hour in Buster. Andrei POPESCU <andreimpopescu@gmail.com> - 2020-04-30 10:30 +0200
                Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-30 13:20 +0200
                Re: Output from date command defaults to 12-hour in Buster. Nicolas George <george@nsup.org> - 2020-04-30 17:10 +0200
        Re: Output from date command defaults to 12-hour in Buster. "Martin McCormick" <martin.m@suddenlink.net> - 2020-04-29 16:00 +0200
          Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-29 16:30 +0200
            Re: Output from date command defaults to 12-hour in Buster. l0f4r0@tuta.io - 2020-04-29 18:20 +0200
  Re: Output from date command defaults to 12-hour in Buster. Reco <recoverym4n@enotuniq.net> - 2020-04-29 08:20 +0200
    Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-29 14:10 +0200
      Re: Output from date command defaults to 12-hour in Buster. Nicolas George <george@nsup.org> - 2020-04-29 14:20 +0200
    Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-29 15:10 +0200
      Re: Output from date command defaults to 12-hour in Buster. "Martin McCormick" <martin.m@suddenlink.net> - 2020-04-29 18:30 +0200
    Re: Output from date command defaults to 12-hour in Buster. "Martin McCormick" <martin.m@suddenlink.net> - 2020-04-29 15:10 +0200
  Re: Output from date command defaults to 12-hour in Buster. James Cloos <cloos@jhcloos.com> - 2020-05-01 18:30 +0200

csiph-web