unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: guix environment and .bashrc
Date: Thu, 3 Jan 2019 23:53:05 +0100	[thread overview]
Message-ID: <CAJ3okZ3-fV5VF2_BvrFmjYPCVstx6K8wd-=18boF33mtqWk3+w@mail.gmail.com> (raw)
In-Reply-To: <CAE4v=phw7sK95u=SJvXc5Q87hthN5FpX-wDhTxGh7OkcGfn-kQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2027 bytes --]

Dear Gábor,

Thank you for your comments.

> What I did was to set up things in .xsessionrc. There is a drawback,
though, and
> it is that this startup file uses /bin/sh, which is most probably
> dash, so I had to
> adjust the recommendation of sourcing the profile. I also got some
indications
> that the generated file I sourced might assume that the used shell is
bash.

Yes, Debian uses dash as /bin/sh since a couple of release, I guess.


> > The way that I use is to add an `else' clause to the $GUIX_ENVIRONMENT
test:
> >
> > if [ -n "$GUIX_ENVIRONMENT" ]
> > then
> >     export PS1="\u@\h \w [dev]\$ "
> > else
> >    source ~/.bash_profile
> > fi
> >
> > Is it correct and the right way to do?
> > If yes, does the manual need improvement in this section (footnote)?
> >
>
> I believe it should be improved. There might also be some other distro
specific
> chevats. There was also a discussion about reducing bashism in the
generated
> files, but I don't remember if a conclusion was reached.

From my point of view the topic is about the interactive shell that it is
used and the fix should not depend so much on the host distro. I imagine.
:-)

Maybe I do not understand a point, but the trick explained in the footnote
of the manual is not accurate. Or I am wrong and I am asking more
explanations. :-)

Well, in X session, when an user opens a terminal, the shell is more often
a non-login interactive shell than a login interactive shell if it is.
Therefore, the file .bash_profile or .profile are not sourced when a
terminal is open on X session.
From my point of view, the simplest fix is at the shell configuration
level, I guess.
For bash, source a file containing all the exports when not in
$GUIX_ENVIRONMENT or something in the spirit is enough, isn't it?
For zsh or other, it depends on how the configuration is sourced; I do not
know.

What do you think?
Or where is wrong?


Thank you in advance for any comments.


All the best,
simon

[-- Attachment #2: Type: text/html, Size: 2344 bytes --]

      reply	other threads:[~2019-01-03 22:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03 18:53 guix environment and .bashrc zimoun
2019-01-03 20:14 ` Gábor Boskovits
2019-01-03 22:53   ` zimoun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ3okZ3-fV5VF2_BvrFmjYPCVstx6K8wd-=18boF33mtqWk3+w@mail.gmail.com' \
    --to=zimon.toutoune@gmail.com \
    --cc=boskovits@gmail.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).