Guix usage

28 risposte [Ultimo contenuto]
chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

Guix was recommended to me as a solution to a particular problem in another thread, and it seems promising in general. I have enough questions that it seemed worth opening a new thread.

1. Configuring installed files for use? For example, if I install Icecat via Synaptic it is immediately added to the launcher menu and I can run it from a terminal with $ icecat whereas if installed via Guix it seems like I have to run it with
$ cd ~/.guix-profile/bin
$ ./icecat

which is much less convenient. I could create a shortcut to access it more conveniently, but maybe there is a cleaner or more proper approach.

2. Is it possible to get Synaptic to recognize a package installed via Guix as an alternate version. This might help with question #1, and it seems like it might be easier and more organized than using two separate package managers.

3. When I run $ giux package -A evolution I see evolution-data-server, but not evolution. It seems odd to me to include one and not the other. Is it possible that I am not seeing all available packages?

4. Moreover, if I could upgrade Evolution (or another default GNOME program) via Guix, what be be the most effective way of replacing the old version in a way that makes it work with the GNOME applet etc.? This might be related to question #2.

Thanks!

happy_gnu
Offline
Iscritto: 08/06/2017

1.- You have to add Guix to your PATH and reboot

2.- No this is not possible, you could install Emacs with Guix and then launch this Emacs and it will have installed the necessary packages to use it as Synaptic.

3.- I am not sure, it is possible. You can look for all the installed packages using Emacs. Or looking for them here https://www.gnu.org/software/guix/packages/

4.-Remove the package with synaptic and install the Guix version.

WARNING: DO NOT REMOVE THINGS UNLESS YOU ARE ABSOLUTELY SURE WHAT YOU ARE DOING.

Now for 1. How to add Guix to your path...

Did you follow step 8?

I'll save you the trouble it links here:

https://www.gnu.org/software/guix/manual/html_node/Application-Setup.html#Application-Setup

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

I've done step 8. When I run guix package -i glibc-locales I get guile: warning: failed to install locale
warning: failed to install locale: Invalid argument
guix package: warning: Consider running 'guix pull' followed by
'guix package -u' to get up-to-date packages and security updates.
The following package will be upgraded:
glibc-locales 2.25 -> 2.25 /gnu/store/p5z9rh4m4qkmjygxcbp0q244nkwz7zxn-glibc-locales-2.25
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0%
nothing to be done

(When I run 'guix pull' I always get 'failed to expand heap by x bytes' before it completes, so hopefully that isn't important.)

I get no errors when I run export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale

What should happen if this step worked correctly?

happy_gnu
Offline
Iscritto: 08/06/2017

When you do the EXPORT you should be able to launch software installed with Guix by just typing "program" you installed hello so just type

$ hello

It should run.
If you puth the export in your PATH you should be able to do this and probably see the icons of the programs on the menu of your Desktop Environment (I am not sure about this is I don't use menus only I3wm with dmenu)

The path should be ~/.bash_profile but I don't remember exactly to be honest.

Maybe someone can help us or you can ask for a little more help on #guix on IRC they are friendly and helpful.

If you use IRC make sure to join #lgn :) I am there most of the time. Is a great channel

happy_gnu
Offline
Iscritto: 08/06/2017
chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

Does that mean I should add export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale to '~/.profile' instead of executing it in the terminal? If so what should be different after I do that? I don't know what it looks like when Guix is working correctly so I don't know how to check if something is working.

ADFENO
Offline
Iscritto: 12/31/2012

Hi all,

I just came back from a turbulence on the email service provider I use,
so I'll try to answer the questions as best as I can:

1. I'll split it in two:

1. Make packages appear as simple terminal commands: For this to
work, the PATH variable must reference to important places inside
"${HOME}/.guix-profile" (for clarification: "${HOME}" is [Your
user's home], don't worry, the shell understands it correctly, you
can even test it by doing "echo ${HOME}").

To do so, edit the ".profile" file that is under your user's home
(if it doesn't exist: create it), and insert the following text:

--8<---------------cut here---------------start------------->8---
export GUIX_PROFILE="${HOME}/.guix-profile"
source "${GUIX_PROFILE}/etc/profile"
export GUIX_LOCPATH="${GUIX_PROFILE}/lib/locale"
export GUIX_GTK3_PATH="${GUIX_PROFILE}/lib/gtk-3.0${GUIX_GTK3_PATH:+:}${GUIX_GTK3_PATH}"
export PATH="${GUIX_PROFILE}/bin:${GUIX_PROFILE}/sbin${PATH:+:}${PATH}"
--8<---------------cut here---------------end--------------->8---

These "${[Some variable]:+:}" simply make sure that there is no
ending ":" if "[Some variable]" is unset.

Now, you can simply log out and then log back in (no need to
reboot the computer), and notice that IceCat can be launched from
the terminal using the `icecat` command.

2. To make an application launcher appear in the menus, provided it
does have a launcher file (I know IceCat does): For this we will
once again edit the user's ".profile". This time, though we need
to take some important notes.

In a terminal, make it show us what is inside ${XDG_DATA_DIRS}, to
do this, do: echo ${XDG_DATA_DIRS}

This will show you were most applications will look for things
such as launchers, text fonts, themes, and so on (besides the
user's ".local/share" directory). We must take note of what was
just printed/shown, I'll call this note as "Copied text".

Now, edit the user's ".profile", and add, after the last line that
I gave in item 1.1:

--8<---------------cut here---------------start------------->8---
export XDG_DATA_DIRS="${GUIX_PROFILE}/share:[Copied text, without these brackets]"
--8<---------------cut here---------------end--------------->8---

Now, you can simply log out and then log back in (no need to
reboot the computer), and notice that IceCat can be launched from
the menus.

2. Already answered.

3. Evolution (email client) itself isn't packaged yet. The data server
of it is. In fact, some packages depend on the data server to do some
things.

4. Remove the package with Synaptic and install from Guix. Be careful
though when removing packages using Synaptic. Thankfully, Synaptic is
one of the package managers that makes it very clear what will be
removed/updated/replaced/installed before doing anything.

It's a good idea to simply copy the list of actions that Synaptic
tells you that it would do, and post the list here in case of
doubt. People here will probably know if some package will end up
removing "too much" stuff.

Optionally, you can start searching for each item in that list of
actions, but this is not required.

Respectfully, Adonay.

Happy hacking! :)

--
- [[https://libreplanet.org/wiki/User:Adfeno]]
- Palestrante e consultor sobre /software/ livre (não confundir com
gratis).
- "WhatsApp"? Ele não é livre, por isso não uso. Iguais a ele prefiro
GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard
que está no endereço acima aos teus contatos.
- Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu
aceito, mas não repasso. Entrego apenas em formatos favoráveis ao
/software/ livre. Favor entrar em contato em caso de dúvida.

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

All of that worked perfectly. Thanks for your help.

happy_gnu
Offline
Iscritto: 08/06/2017

It was an amazing answer Adfeno :).

I am glad everything is working now mason :)

ADFENO
Offline
Iscritto: 12/31/2012

You're welcome! :)

ADFENO
Offline
Iscritto: 12/31/2012

You're welcome! :)

davidpgil
Offline
Iscritto: 08/26/2015

I'm having issues getting this to work in Trisquel 7 ... What does your XDG output look like? I think mine may be messed up somehow.

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

Mine looks like this in Trisquel 8

/usr/share/mate:/usr/share/mate:/home/mason/.guix-profile/share:/usr/share/mate:/usr/share/mate:/usr/local/share:/usr/share:/var/lib/snapd/desktop

I think /home/mason/.guix-profile/share was added by ADFENO's steps.

ADFENO's solution worked fine back when I was using Trisquel 7 too. What specifically is going wrong for you?

davidpgil
Offline
Iscritto: 08/26/2015

I am hoping the icons for the programs i install would appear in the pull down menu. When I was using Trisquel 8, ADFENOs technique worked. But in Trisquel 7, that doesn't work.

Mine looks like this:
/usr/share/trisquel-session:/usr/share/gnome:/home/davidpgil/.guix-profile/share:/usr/share/mate:/usr/share/mate:/usr/local/share/:/usr/share/

My suspicion is when I copied my home folder from Trisquel 8 to 7 some "remains" of Trisquel 8's Mate Desktop still exists, because it shows up in my XDG listing.

Do you see something suspicious in mine?

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

Yes, I also think that's where the Mate stuff is from, but as long as

/home/davidpgil/.guix-profile/share

is in there I don't see why that would matter

What is the output of$ echo ${GUIX_PROFILE}?

davidpgil
Offline
Iscritto: 08/26/2015

Its "/home/davidpgil/.guix-profile"

Why?

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

Just double checking that it matches what's in the ${XDG_DATA_DIRS} output. It does, so that's not the problem.

Try checking the contents of '~/.guix-profile/share/applications' Do you see desktop files for the applications you expect to appear in the menu?

If no, try reinstalling one of the applications and see if that creates a desktop file there.

If yes, do the applications for which you have desktop files appear in a launcher like Synapse?

davidpgil
Offline
Iscritto: 08/26/2015

I dont see a applications folder in "~/.guix-profile/share" ... reinstalling doesn't create the folder. Also the programs installed from Guix, arent visible via Synapse ... ugh... what happened?

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

It sounds like the desktop files are missing, which explains why they aren't showing up in menus and Synapse. Now we just have to figure out how to get them back.

Did you reinstall Guix after returning to Trisquel 7, or is this the current install from when you were using Trisquel 8?

Try rerunning steps 4 and 8 of the Guix installation.

https://www.gnu.org/software/guix/manual/html_node/Binary-Installation.html

davidpgil
Offline
Iscritto: 08/26/2015

On step 4 I goto https://www.gnu.org/software/guix/manual/html_node/Build-Environment-Setup.html#Build-Environment-Setup

typing "guix-daemon --build-users-group=guixbuild" gives the error "bash: guix-daemon: command not found"

Maybe thats the issue? How do I get this to work on Trisquel 7?

I reinstalled Guix after returning to Trisquel 7.

UPDATE:
Redoing steps 2 and 3 cause "guix-daemon --build-users-group=guixbuild" run as root to hang or a while... I'm waiting to see if it does anything...

UPDATE:
So, it just hangs right there... I give up. I might reinstall Trisquel 7 and do this over. Maybe.

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

Okay, I'm out of ideas except for uninstalling Guix completely and reinstalling. Unfortunately I can't find anything in the documentation about uninstalling. A fresh install of T7 would work as a last resort.

Maybe ADFENO will stop by and save the day. In the meantime, you might try the help-guix mailing list.

https://lists.gnu.org/mailman/listinfo/help-guix

They're pretty responsive.

EDIT: First try installing icecat real quick as per ADFENO's suggestion. I had assumed that the applications you have installed are supposed to have desktop files since you didn't notice this problem in T8, but it's worth checking with an application that definitely should have one.

davidpgil
Offline
Iscritto: 08/26/2015

Fixed by reinstalling Trisquel 7 :/ bleh ... Thanks for trying to help

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

Sorry we didn't find an easier solution. I'm glad it's working now.

ADFENO
Offline
Iscritto: 12/31/2012

You can also try to install an application which is known to have such
menu entries, I have a list which might interest you:

emacs
enigma
gajim
gimp
gnucash
icecat
inkscape
pidgin
synfigstudio

This is not a complete list, they are just suggestions.

2017-12-23T00:13:53+0100 name at domain wrote:
> Just double checking that it matches what's in the ${XDG_DATA_DIRS}
> output. It does, so that's not the problem.
>
> Try checking the contents of '~/.guix-profile/share/applications' Do
> you see desktop files for the applications you expect to appear in the
> menu?
>
> If no, try reinstalling one of the applications and see if that
> creates a desktop file there.
>
> If yes, do the applications for which you have desktop files appear in
> a launcher like Synapse?
>

--
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
(apenas sem DRM), PNG, TXT, WEBM.

calher

I am a member!

Offline
Iscritto: 06/19/2015

I have been using ADFENO's technique in Trisquel 7 Seven for quite some
time.

davidpgil
Offline
Iscritto: 08/26/2015

Big hugs, ADFENO! You are so diligent. Thank you!

ADFENO
Offline
Iscritto: 12/31/2012

I don't know if I already answered, but: you're welcome! ;)

2017-12-17T23:59:01+0100 name at domain wrote:
> Big hugs, ADFENO! You are so diligent. Thank you!

davidpgil
Offline
Iscritto: 08/26/2015

This message was when I got Guix running in Trisquel 8 ... I went to Trisquel 7 now :/

davidpgil
Offline
Iscritto: 08/26/2015

I got it working by reinstalling Trisquel 7 :/