From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Application Setup on Trisquel Date: Thu, 09 Nov 2017 13:05:45 -0800 Message-ID: <87zi7upuy9.fsf@gmail.com> References: <1508868738.10767@bluehome.net> <873768nt5e.fsf@gnu.org> <87lgk0rrlx.fsf@kryshen.net> <87lgjxg5it.fsf@gnu.org> <1510123173.8495.16.camel@leela> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eD1ny-0004gp-CG for help-guix@gnu.org; Fri, 10 Nov 2017 00:24:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eD1nu-0003gO-Vn for help-guix@gnu.org; Fri, 10 Nov 2017 00:24:38 -0500 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Caleb Herbert Cc: help-guix@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Caleb Herbert writes: > On Thu, 2017-10-26 at 10:53 -0700, Ludovic Court=C3=A8s wrote: >> Mikhail Kryshen skribis: >>=20 >> > Ludovic Court=C3=A8s writes: >> > >> >>> Is there a way to make Trisquel's GNOME and its main menu aware of >> >>> programs installed with Guix? >> >> >> >> It should be possible, but I don=E2=80=99t know how. Anyone? >> > >> > I don't use Trisquel, but this works for GNOME in Fedora: >> > >> > ln -s ~/.guix-profile/share/applications ~/.local/share/applications= /guix >> > >> > You might also want to copy or symlink application icons from >> > ~/.guix-profile/share/icons to ~/.local/share/icons > > I have a better way. This did not work for me on Trisquel. > > My experience: Apps appeared in the main menu, but GNOME was not aware > of them. Icons were missing, Emacs would never show up in "Open With", > and I couldn't launch Mumble from Run Application (Alt+F2). > > Solution: > https://trisquel.info/en/forum/guix-trisquel#comment-122789 > (Thanks, ADFENO!) > > GNOME sees apps and icons now! This sounds very similar to https://lists.gnu.org/archive/html/help-guix/2017-05/msg00069.html in which the interaction between Guix-installed packages (emacs, in my case) and the XDG_DATA_DIRS environment variable caused the UI (including icons) to display incorrectly. It would be nice to solve this in general for Guix-installed applications on foreign distros. Do you have any ideas about how we can solve it? The Guix-installed emacs, in particular, has some wrapper scripts: =2D-8<---------------cut here---------------start------------->8--- [0] marusich@garuda:~ $ cat $(readlink $(which emacs)) #!/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash export XDG_DATA_DIRS=3D"/gnu/store/llwrfx84y7qv00c5y1c6ys24x2i2xh0p-shared-= mime-info-1.8/share:/gnu/store/qzmyyj0jx6n14vsffa66jgsnnvwhby3n-glib-2.52.3= /share:/gnu/store/2zvqvqakdf03yqgix5qzn48ix7amkzi0-gtk+-3.22.21/share:/gnu/= store/0vvlz13k099ra6p0wrmrl99akbhflqqg-emacs-25.3/share${XDG_DATA_DIRS:+:}$= XDG_DATA_DIRS" export GTK_PATH=3D"/gnu/store/2zvqvqakdf03yqgix5qzn48ix7amkzi0-gtk+-3.22.21= /lib/gtk-3.0${GTK_PATH:+:}$GTK_PATH" export GIO_EXTRA_MODULES=3D"/gnu/store/qzmyyj0jx6n14vsffa66jgsnnvwhby3n-gli= b-2.52.3/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES" exec -a "$0" "/gnu/store/0vvlz13k099ra6p0wrmrl99akbhflqqg-emacs-25.3/bin/em= acs-25.3" "$@" [0] marusich@garuda:~ $ cat /gnu/store/0vvlz13k099ra6p0wrmrl99akbhflqqg-emacs-25.3/bin/emacs-25.3 #!/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash export XDG_DATA_DIRS=3D"/gnu/store/llwrfx84y7qv00c5y1c6ys24x2i2xh0p-shared-= mime-info-1.8/share:/gnu/store/qzmyyj0jx6n14vsffa66jgsnnvwhby3n-glib-2.52.3= /share:/gnu/store/2zvqvqakdf03yqgix5qzn48ix7amkzi0-gtk+-3.22.21/share:/gnu/= store/0vvlz13k099ra6p0wrmrl99akbhflqqg-emacs-25.3/share${XDG_DATA_DIRS:+:}$= XDG_DATA_DIRS" export GTK_PATH=3D"/gnu/store/2zvqvqakdf03yqgix5qzn48ix7amkzi0-gtk+-3.22.21= /lib/gtk-3.0${GTK_PATH:+:}$GTK_PATH" export GIO_EXTRA_MODULES=3D"/gnu/store/qzmyyj0jx6n14vsffa66jgsnnvwhby3n-gli= b-2.52.3/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES" exec -a "$0" "/gnu/store/0vvlz13k099ra6p0wrmrl99akbhflqqg-emacs-25.3/bin/.e= macs-25.3-real" "$@" [0] marusich@garuda:~ $ file /gnu/store/0vvlz13k099ra6p0wrmrl99akbhflqqg-emacs-25.3/bin/.emacs-25= .3-real /gnu/store/0vvlz13k099ra6p0wrmrl99akbhflqqg-emacs-25.3/bin/.emacs-25.3-real= : ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, = interpreter /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/ld-l= inux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped, with debug_info [0] marusich@garuda:~ $=20 =2D-8<---------------cut here---------------end--------------->8--- In particular, note how the two wrapper scripts add (the same) store entries to the front of the existing XDG_DATA_DIRS environment variable. I was able to solve my emacs UI problem by removing the "/usr/share/" entry from XDG_DATA_DIRS. You were able to solve your problem by adding ${HOME}/.guix-profile/share to the front of XDG_DATA_DIRS and adding the foreign distro's XDG_DATA_DIRS (including "/usr/share/" to the end). I feel like these clues are pointing to something, but I'm not yet sure what. Do you have any good ideas? I think it's fine (although I wish it weren't necessary at all) to require users to customize their environment to enable all features of Guix-installed applications on a foreign distro (features like properly displayed icons, locales, etc.) . However, asking users to configure XDG_DATA_DIRS seems significantly more complicated, due to problems like these, and also like bug 26202: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D26202 I really hope we can figure out a way to get things that rely on XDG_DATA_DIRS to work better out of the box. > Remaining hurdles: > * Buttons don't show up, themes don't match: > https://lut.im/g7za20HA8Z/U8CWURMKf3X0a1GI.png Could this be the same issue that I saw with emacs? I mentioned this above, but here's the link again: https://lists.gnu.org/archive/html/help-guix/2017-05/msg00069.html > * Fcitx Mozc input method for Japanese does not work in Guix apps Can you tell us more about your use case? Are you trying to install fcitx etc. via Guix, and then use it to type in Japanese within Guix-installed applications (do they use GTK, or something else)? Or did you install fcitx etc. using the foreign distro's package manager (e.g., apt-get), and now you are trying to use that IME to type in Japanese within Guix-installed apps? The interaction between an IME and its environment is tricky to get right and depends on a lot of factors, so I expect it might require a non-trivial amount of work to make it so that all Guix-installed apps will correctly make use of an IME that is installed and managed by the foreign distro. FWIW, I have been able to get Japanese input working in GuixSD in all apps using ibus and ibus-anthy. I haven't yet tried to get Japanese input working in Guix-installed applications on a foreign distro. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAloFOA4ACgkQ3UCaFdgi Rp04/RAAjT0xlZ/6BuYGNCnUFdXjTizNZhWtLS2i4uQnfhxHBnBrEnOeV/0wAcbY v+gxM334EwCZcX+dwdAka/d+wojm/Wg9nMreqW39jdSmJMfv8wmVRzFBGcSOkzvQ vmRRi9jf3i53y5+5dPZqab3KKExgS7lDR/U6WOEInAj0v6szyIvebjPJ2txysu5c P9tua2pywxgeZMvwm4iseHyQv7Tm3fMrhdOwe1mC/mRirCgBTW54InWzssbN5wRz 6TMVVOYiSjcwoSe4xDx56pXIz+T7Ff9r6xB+rlBmv11PU2b4u7Iy+RRc+DfIUvkX lNRP2dvdmk3lzEJE+/4TBBH1XHM9MKNFXZoXIjl4qjdj9g8ijtzsFJiXedS00hzl toAkt/IkOdrnJmXdtfRQ2tx2/xEKVju9lo+IwHMZY5S97XorRi9L3inWOwF1Vr4G zlyrnTwEB5d9zn3EVzQm7aeG2SbH4WVs6cvydFZEJaevTJzO8FKU4tlfu1D4HTC8 FPyASgjjM3G0xSim6t4CywjfDHUeFkmerk8FlptQzHJOgbg6TMRZ65ig2rzi/XVG LE4hNT25M4nUrU5zomtxqTuDYCEcocEpDMBd/0phpuyj1LJENBZdU1Nkb1pzlh2x Xd/1mMG6MRq72uePczb5Fxzr0TxGitwX4Qnuu0OD2oSvJZnP8eU= =JoOu -----END PGP SIGNATURE----- --=-=-=--