all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giovanni Biscuolo <g@xelera.eu>
To: Mark H Weaver <mhw@netris.org>, bo0od <bo0od@riseup.net>,
	48796@debbugs.gnu.org
Subject: bug#48796: Guix on Debian 11 - Cant run or find applications from Guix
Date: Thu, 17 Jun 2021 16:56:42 +0200	[thread overview]
Message-ID: <87wnqsletx.fsf@xelera.eu> (raw)
In-Reply-To: <878s3ogq0m.fsf@netris.org>

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

Hi,

I use Guix on top of Debian, but I installed it long ago "manually" and
not via the Debian package "guix"... anyway once installed there are no
differences :-)

Mark H Weaver <mhw@netris.org> writes:

[...]

>> both of the commands worked but the x package has no icon nor i can run 
>> it using terminal.
>
> The reason you can't simply type "icecat" in the terminal is because
> Guix puts the 'icecat' executable in ~/.guix-profile/bin/icecat, but
> that directory is not in your PATH environment variable.

bo0od please ensure you have this in your ~/.bash_profile:

--8<---------------cut here---------------start------------->8---

GUIX_PROFILE="$HOME/.config/guix/current"
. "$GUIX_PROFILE/etc/profile"

--8<---------------cut here---------------end--------------->8---

Actually, I set all the env variables for Guix in my ~/.profile that
(AFAIU) on Debian is included by default in ~/.bash_profile:

My ~/.bash_profile:

--8<---------------cut here---------------start------------->8---

if [ -f ~/.profile ]; then
    . ~/.profile
fi

--8<---------------cut here---------------end--------------->8---

My (edited) ~/.profile:

--8<---------------cut here---------------start------------->8---

### Guix settings
#
# add Guix current path
export PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
# add Guix infopath
export INFOPATH="$HOME/.config/guix/current/share/info:$INFOPATH"
# Guix locpath
export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
# set default Guix profile
export GUIX_PROFILE="$HOME/.guix-profile"
# set Guix extra profiles
export GUIX_EXTRA_PROFILES="$HOME/.guix-extra-profiles"
# set timezone data dir (zoneinfo)
export TZDIR=${GUIX_PROFILE}/share/zoneinfo
# source default Guix profile
. $GUIX_PROFILE/etc/profile

### XDG_CONFIG_DIRS fixes
# see Message-ID: <87r2asweu1.fsf@roquette.mug.biscuolo.net>
unset XDG_CONFIG_DIRS
export XDG_CONFIG_DIRS="${GUIX_PROFILE}/etc/xdg:/etc/xdg"

--8<---------------cut here---------------end--------------->8---

Actually I don't know if all env variables are still really needed, I
need to test things

Also (I don't know why) in my home this two profiles are differing:

--8<---------------cut here---------------start------------->8---

$HOME/.config/guix/current -> /var/guix/profiles/per-user/root/current-guix
$HOME/.guix-profile -> /var/guix/profiles/per-user/giovanni/guix-profile

--8<---------------cut here---------------end--------------->8---

so I'm using my user (giovanni) profile for my GUIX_PROFILE env
variable.

[...]

> That's because environment variable settings are _not_ global.  Each
> process has its own set of environment variable settings.  Typically,
> newly spawned processes inherit their environment variable settings
> from the parent process that launched them.

This is the reason why with Guix installed programs we have to set the
variables for each shell we use:

1. for the bash shell you do this by setting the variables in
~/.bash_profile (or ~/.profile like I'm doing)

> In order to set your environment variables appropriately for your entire
> desktop environment, you must arrange for the environment variable
> settings to be loaded before the desktop session is launched.  I don't
> remember off-hand how to do this in Debian.  I seem to recall that one
> approach is to create an ~/.xsessionrc file,

Yes, AFAIK Mark is right:

2. for the desktop environment (shell) I include ~/.profile in my
~/.xsessionrc (because I like to keep all variables in one place)

My ~/.xsessionrc:

--8<---------------cut here---------------start------------->8---

if [ -f ~/.profile ]; then
    . ~/.profile
fi

--8<---------------cut here---------------end--------------->8---

This way all your xsessions (all X sessions should read ~/.xsessionrc)
will have the right environment (from your default Guix profile) and you
will be able to start Guix installed programs there (i.e. I use i3 for
this and it works well)

For the record, application and icons are sourced by XDG compliant
desktop environment from the XDG_DATA_DIRS env variable, that variable
should be in your default user profile, in
$HOME/.guix-profile/etc/profile, that you should source both in
~/.bash_profile and ~/.xsessionrc as explained above

> which should be an executable Bash script

AFAIU it can be a regular file

[...]

> I'm surprised this isn't well-trodden territory, long ago documented in
> our manual, but I guess it isn't.  It would be good if some Debian
> expert(s), or at least someone who runs Guix on top of Debian, would
> step forward to fill in the details.

I'll try do propose some patch for the Guix manual but... don't hold
your breath, I need some testing.

Happy hacking! Gio'

[...]

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

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

  reply	other threads:[~2021-06-17 14:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02 18:56 bug#48796: Guix on Debian 11 - Cant run or find applications from Guix bo0od
2021-06-03 21:26 ` Maxime Devos
2021-06-03 23:18   ` bo0od
2021-06-05  9:47     ` Maxime Devos
2021-06-05 11:25       ` bo0od
2021-06-05 17:49 ` Mark H Weaver
2021-06-17 14:56   ` Giovanni Biscuolo [this message]
2021-07-15 14:05     ` bo0od
2021-08-23 10:20       ` zimoun
2021-07-02 16:31 ` zimoun
2021-07-15 13:09   ` bo0od
2021-08-23 10:42     ` zimoun
2021-08-23  0:58 ` bug#48796: Just a newb, srsly this saved me Luke Burgess
2021-09-23 11:56   ` bug#48796: Guix on Debian 11 - Cant run or find applications from Guix Maxim Cournoyer
2021-09-23 12:10 ` Maxim Cournoyer
2021-09-24 20:46   ` bo0od
2021-09-26  5:50     ` Maxim Cournoyer
2022-01-04 23:16       ` zimoun
2022-04-28 14:14         ` Giovanni Biscuolo
2022-04-28 15:59   ` bug#48796: Guix on Debian 11 - Cant run or find applications from Guix in Desktop Menus Giovanni Biscuolo
2022-04-29 19:18     ` Liliana Marie Prikler
2022-05-02 12:49       ` Giovanni Biscuolo
2022-05-04  8:31         ` Giovanni Biscuolo
2022-05-04 19:14         ` Liliana Marie Prikler
2022-05-05 17:16           ` Giovanni Biscuolo
2022-05-07  9:25   ` bug#48796: Guix on Debian 11 - Cant run or find applications from Guix Giovanni Biscuolo
2022-05-07 10:59     ` Giovanni Biscuolo
2022-06-23  8:20 ` zimoun
2022-10-08 14:37   ` zimoun
     [not found] ` <handler.48796.D48796.166524222215541.notifdone@debbugs.gnu.org>
2022-10-14 17:35   ` bug#48796: closed (Re: bug#48796: Guix on Debian 11 - Cant run or find applications from Guix) bo0od via Bug reports for GNU Guix
2022-10-17  1:30     ` bug#48796: Guix on Debian 11 - Cant run or find applications from Guix Maxim Cournoyer

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnqsletx.fsf@xelera.eu \
    --to=g@xelera.eu \
    --cc=48796@debbugs.gnu.org \
    --cc=bo0od@riseup.net \
    --cc=mhw@netris.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.