unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Setting environment variables (GUIX on foreign distro)
@ 2020-04-05 20:49 Zelphir Kaltstahl
  2020-04-06 17:11 ` Leo Famulari
  0 siblings, 1 reply; 5+ messages in thread
From: Zelphir Kaltstahl @ 2020-04-05 20:49 UTC (permalink / raw)
  To: help-guix

Hello,

My question regards setting environment variables, which are considered
by applications installed via GUIX on a foreign distro (Trisquel). What
is the best practice to set custom environment variables?

I've successfully set them in my ~/.guix-profile/etc/profile before, but
there they will be overwritten when I update packages. I could not find
anything about an extra file with the purpose of housing user
definitions and not changing them.

My scenario is, that I wish to point LyX to a non-GUIX-installed texlive
distribution, which is done by setting the following environment variables:

TEXMF, TEXMFCNF

My texlive installation is more up to date than the one in GUIX
packages, complete and I wish to use that one, instead of having GUIX
point to any texlive distribution of GUIX.

Regards,
Zelphir

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting environment variables (GUIX on foreign distro)
  2020-04-05 20:49 Setting environment variables (GUIX on foreign distro) Zelphir Kaltstahl
@ 2020-04-06 17:11 ` Leo Famulari
  2020-04-07 14:27   ` Joshua Branson
  2020-04-07 23:14   ` Zelphir Kaltstahl
  0 siblings, 2 replies; 5+ messages in thread
From: Leo Famulari @ 2020-04-06 17:11 UTC (permalink / raw)
  To: Zelphir Kaltstahl; +Cc: help-guix

On Sun, Apr 05, 2020 at 10:49:54PM +0200, Zelphir Kaltstahl wrote:
> My question regards setting environment variables, which are considered
> by applications installed via GUIX on a foreign distro (Trisquel). What
> is the best practice to set custom environment variables?

You should set them in the typical way for your operating system and
shell. In general, you should do it in the initialization files for
login shells. If you are using Bash, use ~/.bash_profile.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting environment variables (GUIX on foreign distro)
  2020-04-06 17:11 ` Leo Famulari
@ 2020-04-07 14:27   ` Joshua Branson
  2020-04-07 23:14   ` Zelphir Kaltstahl
  1 sibling, 0 replies; 5+ messages in thread
From: Joshua Branson @ 2020-04-07 14:27 UTC (permalink / raw)
  To: help-guix


Is there a way to set environmental variables in your config.scm file?
That way that information is stored in Guix System?  I'd like to put all
information about my OS inside my config if possible.

-- 
Joshua Branson
Sent from Emacs and Gnus

P.S. I am subscribed to help-guix.  Please do not send email to my
inbox.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting environment variables (GUIX on foreign distro)
  2020-04-06 17:11 ` Leo Famulari
  2020-04-07 14:27   ` Joshua Branson
@ 2020-04-07 23:14   ` Zelphir Kaltstahl
  2020-04-07 23:45     ` Leo Famulari
  1 sibling, 1 reply; 5+ messages in thread
From: Zelphir Kaltstahl @ 2020-04-07 23:14 UTC (permalink / raw)
  To: Leo Famulari; +Cc: help-guix

I already set them in my ~/.profile, but that does not seem to work, as
they are not seen when starting LyX (or perhaps any GUIX installed
app?). Would setting them in ~/.bash_profile work? I thought that
~/.profile is loaded on login. I also need the variables to be visible,
when I click a launcher for example, so not only when I open a terminal.
Not sure bash_profile would be considered in that case?

I need to try this. Thanks so far!

On 4/6/20 7:11 PM, Leo Famulari wrote:
> On Sun, Apr 05, 2020 at 10:49:54PM +0200, Zelphir Kaltstahl wrote:
>> My question regards setting environment variables, which are considered
>> by applications installed via GUIX on a foreign distro (Trisquel). What
>> is the best practice to set custom environment variables?
> You should set them in the typical way for your operating system and
> shell. In general, you should do it in the initialization files for
> login shells. If you are using Bash, use ~/.bash_profile.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting environment variables (GUIX on foreign distro)
  2020-04-07 23:14   ` Zelphir Kaltstahl
@ 2020-04-07 23:45     ` Leo Famulari
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Famulari @ 2020-04-07 23:45 UTC (permalink / raw)
  To: Zelphir Kaltstahl; +Cc: help-guix

On Wed, Apr 08, 2020 at 01:14:40AM +0200, Zelphir Kaltstahl wrote:
> I already set them in my ~/.profile, but that does not seem to work, as
> they are not seen when starting LyX (or perhaps any GUIX installed
> app?). Would setting them in ~/.bash_profile work? I thought that
> ~/.profile is loaded on login. I also need the variables to be visible,
> when I click a launcher for example, so not only when I open a terminal.
> Not sure bash_profile would be considered in that case?

Check the Bash man page, section INVOCATION, and then FILES. That
explains what files are used and in what situations.

In short, ~/.profile or ~/.bash_profile should both work. Remember, they
are for login shells, so you need to log in again to see the effect.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-07 23:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05 20:49 Setting environment variables (GUIX on foreign distro) Zelphir Kaltstahl
2020-04-06 17:11 ` Leo Famulari
2020-04-07 14:27   ` Joshua Branson
2020-04-07 23:14   ` Zelphir Kaltstahl
2020-04-07 23:45     ` Leo Famulari

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