Subject: Re: bug#48796: Guix on Debian 11 - Cant run or find applications from Guix

From: bo0od <[email-masked]>
Date: Fri, 24 Sep 2021 20:46:54 +0000

> I suspect you didn't install Guix via this script?  If so, could you try
 > creating the above file, closing relogin in your graphical session and
 > report if it fixed things for you?

Its already answered how to fix it after installation, Thats not the 
only issue, The real issue is guix isnt doing this by default after 
installing it, You dont expect users to make crazy steps after 
installation just to make guix works properly.

Solution to this must developed in a way that when user install guix 
package then he type guix install x then it should work without further 
configs.

Otherwise we have snap and flatpak which both are better than guix not 
just with lower complexity but even more security. (snap use 
lxc(container)+apparmor(mac), flatpak use bubblerap (namespace/seccomp), 
while guix doesnt use anything by default).

Maxim Cournoyer:
> Hello,
> 
> bo0od <[email-masked]> writes:
> 
>> Hi There,
>>
>> I have installed Guix package manager over debian bullseye 11 then i
>> installed a package using guix (after running guix pull) with two
>> ways: (x package i tried is icecat)
>>
>> guix install x
>>
>> sudo -i guix install x
>>
>> both of the commands worked but the x package has no icon nor i can
>> run it using terminal.
> 
> There are two things that Guix does to help users correctly configure
> their system so that Guix installed applications appear on PATH.
> 
> 1. The guix-install.sh installation script installs a
> /etc/profile.d/guix.sh script that configures the PATH when logging in:
> 
> --8<---------------cut here---------------start------------->8---
> # cat /etc/profile.d/guix.sh
> # _GUIX_PROFILE: `guix pull` profile
> _GUIX_PROFILE="$HOME/.config/guix/current"
> export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
> # Export INFOPATH so that the updated info pages can be found
> # and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info
> # When INFOPATH is unset, add a trailing colon so that Emacs
> # searches 'Info-default-directory-list'.
> export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"
> 
> # GUIX_PROFILE: User's default profile
> GUIX_PROFILE="$HOME/.guix-profile"
> [ -L $GUIX_PROFILE ] || return
> GUIX_LOCPATH="$GUIX_PROFILE/lib/locale"
> export GUIX_LOCPATH
> 
> [ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
> 
> # set XDG_DATA_DIRS to include Guix installations
> export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
> --8<---------------cut here---------------end--------------->8---
> 
> It even set XDG_DATA_DIRS, which should allow integration with the GNOME
> Shell and other graphical dashboards.
> 
> I suspect you didn't install Guix via this script?  If so, could you try
> creating the above file, closing relogin in your graphical session and
> report if it fixed things for you?
> 
> Perhaps we should more strongly recommend using this installation script
> and/or augment the manual installation procedure to cover for the above
> configuration.
> 
> A second thing that Guix does to help users configure their environ Guix
> is to hinted at sourcing the profile, if the user ~/.guix-profile/bin
> was not already in PATH, like so:
> 
> 
> --8<---------------cut here---------------start------------->8---
> # env PATH=/usr/local/bin:/bin guix install zile
> guix install: warning: Consider running 'guix pull' followed by
> 'guix package -u' to get up-to-date packages and security updates.
> 
> The following package will be installed:
>     zile 2.4.15
> 
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> The following derivation will be built:
>     /gnu/store/015zpn0xl8fn2ff1l0vf69w127frp76a-profile.drv
> 
> 0.1 MB will be downloaded
>   zile-2.4.15  108KiB                                             97KiB/s 00:01 [##################] 100.0%
> building CA certificate bundle...
> building fonts directory...
> building directory of Info manuals...
> building database for manual pages...
> building profile with 6 packages...
> hint: Consider setting the necessary environment variables by running:
> 
>       GUIX_PROFILE="/root/.guix-profile"
>       . "$GUIX_PROFILE/etc/profile"
> 
> Alternately, see `guix package --search-paths -p "/root/.guix-profile"'.
> --8<---------------cut here---------------end--------------->8---
> 
> Didn't you see this on your terminal after installing the Guix
> applications?
> 
> Thanks,
> 
> Maxim
>