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

From: Mark H Weaver <[email-masked]>
Date: Sat, 05 Jun 2021 13:49:34 -0400

Hi,

bo0od <[email-masked]> writes:

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

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.

Likewise, the reason there's no icon, i.e. no entry for IceCat in the
list of applications known by desktop environments in Debian, is because
by default desktop environments look in /usr/share/applications for the
".desktop" files, but Guix puts the desktop files in
~/.guix-profile/share/applications.

On a standalone Guix system, these issues are addressed by making sure
your environment variables are set as needed to make these things work.

~/.guix-profile/etc/profile should contain Bash shell commands that set
the environment variables appropriately for the set of packages
currently installed.

If you type "source ~/.guix-profile/etc/profile" from a Bash shell, it
loads the needed environment variable settings into that shell instance,
and henceforth you should be able to run "icecat" by simply typing its
name, *but* _only_ in that shell or other processes later spawned from
that shell.  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.

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, which should be an
executable Bash script that loads the needed environment variable
settings and then launches the desktop environment.  Maybe there's a
better way.

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.

Thanks for raising this issue.

     Regards,
       Mark

-- 
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <https://stallmansupport.org>.