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

Hello,

zimoun <zimon.toutoune@gmail.com> ezt írta (időpont: 2019. jan. 3., Cs, 19:53):
>
> Dear Guixers,
>
> I am running Guix on the top of Debian and I have issue with `guix
> environment --pure'.
> Well, the documentation provides some tips but I am not sure to understand.
> https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-environment.html
>

I also had this problem on Debian.

> I use the Awesome window manager and then I open different xterm.
> Then the shell is an interactive shell but not a login shell---if I
> understand well---so the dance with .profile, .bash_profile and
> .bashrc is not working. I mean when I open an xterm window, the file
> .bash_profile is not read, therefore the env variables are not setup.
>

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.

> 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.

>
> Thank you for any tips.
>
> All the best,
> simon
>

Best regards,
g_bor

  reply	other threads:[~2019-01-03 20:14 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 [this message]
2019-01-03 22:53   ` zimoun

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='CAE4v=phw7sK95u=SJvXc5Q87hthN5FpX-wDhTxGh7OkcGfn-kQ@mail.gmail.com' \
    --to=boskovits@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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).