unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: Caleb Herbert <csh@bluehome.net>
Cc: help-guix@gnu.org
Subject: Re: Application Setup on Trisquel
Date: Thu, 26 Oct 2017 18:02:25 -0700	[thread overview]
Message-ID: <877evhmmhq.fsf@gmail.com> (raw)
In-Reply-To: <1508882649.29501@bluehome.net> (Caleb Herbert's message of "Tue, 24 Oct 2017 15:04:09 -0700 (PDT)")

[-- Attachment #1: Type: text/plain, Size: 4312 bytes --]

Hi Caleb!

"Caleb Herbert" <csh@bluehome.net> 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---
GUIX_PROFILE="$HOME/.guix-profile"
if [[ -f "$GUIX_PROFILE/etc/profile" ]]; then
    source "$GUIX_PROFILE/etc/profile"
fi
--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.

Footnotes: 
[1]  https://bugzilla.gnome.org/show_bug.cgi?id=736660

[2]  https://lists.gnu.org/archive/html/help-guix/2017-05/msg00068.html

[3]  https://wiki.freedesktop.org/www/Specifications/

[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:
https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission_Bit_Required

[5]  https://lists.gnu.org/archive/html/guix-devel/2017-05/msg00104.html

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2017-10-27  1:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 18:12 Application Setup on Trisquel Caleb Herbert
2017-10-24 21:16 ` Ludovic Courtès
2017-10-24 22:04   ` Caleb Herbert
2017-10-26 17:54     ` Ludovic Courtès
2017-10-27  1:02     ` Chris Marusich [this message]
2017-10-24 23:33   ` Caleb Herbert
2017-10-24 23:44     ` Caleb Herbert
2017-10-26 17:52       ` Ludovic Courtès
2017-10-26 20:05         ` Caleb Herbert
2017-10-25  0:36   ` Mikhail Kryshen
2017-10-26 17:53     ` Ludovic Courtès
2017-10-27  3:29       ` Caleb Herbert
2017-11-08  6:39       ` Caleb Herbert
2017-11-09 21:05         ` Chris Marusich
2017-11-10 21:29           ` Caleb Herbert
2017-11-12 14:55           ` Adonay Felipe Nogueira
2017-11-12 17:09             ` Adonay Felipe Nogueira
2017-11-12 13:02         ` Adonay Felipe Nogueira
2017-11-02  2:59 ` Mark H Weaver

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=877evhmmhq.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=csh@bluehome.net \
    --cc=help-guix@gnu.org \
    /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).