From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor_Boskovits?= Subject: Re: guix environment and .bashrc Date: Thu, 3 Jan 2019 21:14:12 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf9Np-0004tA-T1 for help-guix@gnu.org; Thu, 03 Jan 2019 15:14:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gf9Np-0002kD-2h for help-guix@gnu.org; Thu, 03 Jan 2019 15:14:25 -0500 Received: from mail-it1-x12b.google.com ([2607:f8b0:4864:20::12b]:55366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gf9No-0002k2-UK for help-guix@gnu.org; Thu, 03 Jan 2019 15:14:25 -0500 Received: by mail-it1-x12b.google.com with SMTP id m62so46944295ith.5 for ; Thu, 03 Jan 2019 12:14:24 -0800 (PST) In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: zimoun Cc: help-guix Hello, zimoun ezt =C3=ADrta (id=C5=91pont: 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 understan= d. > https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-envir= onment.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 indicati= ons 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 te= st: > > if [ -n "$GUIX_ENVIRONMENT" ] > then > export PS1=3D"\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 spec= ific chevats. There was also a discussion about reducing bashism in the generate= d files, but I don't remember if a conclusion was reached. > > Thank you for any tips. > > All the best, > simon > Best regards, g_bor