[Top][All Lists]

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

Re: Application Setup on Trisquel

From: Chris Marusich
Subject: Re: Application Setup on Trisquel
Date: Thu, 26 Oct 2017 18:02:25 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hi Caleb!

"Caleb Herbert" <address@hidden> writes:

>> > The manual instructs users on foreign distros to export environment
>> > variables.  Doing this in the shell makes the changes temporary. 
>> > Where should these changes be made permanent?  (It is bad practice to
>> > put environment variables in .bashrc.)
>> /etc/profile would be the right place.
> Should this info be added to the manual?  Following the instructions
> as-is leads to lost settings.

Yes, I think we should add something like that.  However, we should be
careful not to provide overly specific instructions, since the answer to
the question of "How do I permanently set environment variables the
RIGHT way?" depends on many factors, and no single answer will be
correct under all circumstances.

Some (but not all) of the factors it can depend on are what distribution
you're using, what your personal preferences are, what shell you're
using, whether your shell is a "login" shell or not, whether your shell
is a "non-interactive" shell or not, and even the whims of your
graphical desktop environment [1].  The answer to that simple question
is surprisingly complicated.

In any case, we should encourage users to source
$GUIX_PROFILE/etc/profile once.  Perhaps we can add the following
example and suggest that users copy it into an appropriate location,
where it will (hopefully) be sourced only once (maybe suggest
/etc/profile as one possible place to accomplish this?):

--8<---------------cut here---------------start------------->8---
if [[ -f "$GUIX_PROFILE/etc/profile" ]]; then
    source "$GUIX_PROFILE/etc/profile"
--8<---------------cut here---------------end--------------->8---

We've discussed the topic of environment variables on foreign distros
before, but nobody updated update the manual as a result [2].

Caleb, would you like to take a stab at updating the manual?  I think it
would make sense to add this information to the "Binary Installation"
section, probably near where we tell the user to "source ‘etc/profile’
to augment ‘PATH’ and other relevant environment variables.  The process
for submitting a patch is described in the "Submitting Patches" section
of the manual.  I'm sure other new users would appreciate it!

As for your other question - how to make GNOME discover programs
installed via Guix in its menus etc. - I'm afraid that's also
complicated.  The method by which a particular graphical desktop
environment finds installed applications can vary.  In theory, if Guix
installs programs in a way that conforms to the Free Desktop [3]
specifications (in particular, the Desktop Entry Specification), then
Guix-installed applications should be discoverable by desktop
environments which follow those specifications, like GNOME.

However, it's entirely possible that different distributions or desktop
environments may interpret the specifications in slightly different,
mutually incompatible ways [4].  As a result, it might unfortunately be
necessary for users to modify their environment, in ways that are
specific to their situation, in order to teach their environment how to
discover Guix-installed programs.  We also had a prior discussion about
this topic, and it still might be an issue [5].  I'm not sure, since I
don't use Ubuntu too frequently these days.  I use GuixSD instead.




[4] For example, Ubuntu seems to require .desktop files to have their
executable bit set, but the Desktop Entry Specification does not require
this, so if Guix installs a .desktop file in the right place, but its
executable bit happens to not be set, Ubuntu might not display it.  One
can imagine that maybe, some other distribution might some day declare
that all .desktop files should NOT be executable, which would make it
difficult to satisfy both distros' requirements.  For details, see here:



Attachment: signature.asc
Description: PGP signature

reply via email to

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