help-guix
[Top][All Lists]
Advanced

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

Re: guix environment and .bashrc


From: Gábor Boskovits
Subject: Re: guix environment and .bashrc
Date: Thu, 3 Jan 2019 21:14:12 +0100

Hello,

zimoun <address@hidden> 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="address@hidden \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 via email to

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