Re: Pinyin in GNOME

2024-04-24 Thread Luis Felipe

Hello again,

El 22/04/24 a las 12:59, Luis Felipe escribió:

Hi Felix,

El 22/04/24 a las 0:47, Felix Lechner via escribió:

Hi Tomas,

On Mon, Nov 06 2023, Tomas Volf wrote:


Not sure about pinyin, but for ibus I need to set

 (simple-service
  'im-env-vars home-environment-variables-service-type
  '(("GTK_IM_MODULE" . "ibus")
   ("QT_IM_MODULE" . "ibus")
   ("XMODIFIERS" . "@im=ibus")
    ;; TODO: Are these still required?  If yes, try to get rid 
of them.

   ("GUIX_GTK2_IM_MODULE_FILE"
 . 
"$HOME/.guix-home/profile/lib/gtk-2.0/2.10.0/immodules-gtk2.cache")

   ("GUIX_GTK3_IM_MODULE_FILE"
 . 
"$HOME/.guix-home/profile/lib/gtk-3.0/3.0.0/immodules-gtk3.cache")))

That works locally under EXWM, but have been unable to get ibus working
under GNOME.  Would someone please post a complete recipe, including
what to install in which profile, and whether to start GNOME in X or
Wayland?


I use GNOME in X. In my system configuration I have this package:

  #| NOTE: I'd like to have ibus available to all users by default,

  but last time I checked, this didn't work as expected and I still
  had to install it in user profiles. |#
  (specification->package "ibus")

In the manifest for my user profile I have these packages:

  "ibus"
  "ibus-anthy"
  "ibus-libhangul"
  "ibus-libpinyin"
  "ibus-speech-to-text"

In my ~/.profile file I export these variables:

  # GUIX RELATED VARIABLES TO WORK AROUND BUG #35610
  # https://issues.guix.gnu.org/issue/35610
  # export 
GUIX_GTK2_IM_MODULE_FILE="$HOME/.guix-profile/lib/gtk-2.0/2.10.0/immodules-gtk2.cache"
  export 
GUIX_GTK3_IM_MODULE_FILE="$HOME/.guix-profile/lib/gtk-3.0/3.0.0/immodules-gtk3.cache"

  # These are needed only to work on Qt apps like TeXmacs.
  export XMODIFIERS="@im=ibus"  # Set X input method server (xim) to 
ibus.

  export QT_IM_MODULE="ibus"    # Set Qt input method module to ibus.

Finally, every time I start a GNOME desktop session, I have to run the 
following:


  ibus-daemon -drx

I input Japanese reliably using this. I don't use the other input 
methods often, but they work, as far as I can see.


Hope that helps,


Just to add that I upgraded my system to guix e2ba933 today, started the 
new GNOME 44.10 (Wayland) and I still can use ibus input methods 
normally with those same settings.




OpenPGP_0x0AB0D067012F08C3.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: How to share profile among machines ?

2024-04-24 Thread Tomas Volf
On 2024-04-24 16:54:19 +0200, Emmanuel Medernach wrote:
> Hello Guix !
>
> How do you share profiles among machines ? For instance 2 users wants to
> have the same profile, user A shares the directory /gnu/store/...-profile to
> user B, user B either get access to it directly or from a remote machine
> with a  "guix copy ", user B could now use this profile like this:
>
>  export GUIX_PROFILE="/gnu/store/...-profile"
>  source "$GUIX_PROFILE/etc/profile"
>
> But there is a problem: this profile is not listed with
>
>  guix package --list-profiles
>  guix gc --list-roots
>
> The problem is that if user A deletes this profile it gets garbage collected
> even if user B still needs to use it.
>
> So the question is: How user B could add an existing /gnu/store/...-profile
> (either existing directory or obtained from a guix copy) to the profile and
> root list ?

I think you can just create a symlinks in the /var/guix/profiles/per-user/B for
the profile and in the /var/guix/gcroots/profiles/per-user/B for the gc roots.

I *think* this should work?

Tomas

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.


signature.asc
Description: PGP signature


How to share profile among machines ?

2024-04-24 Thread Emmanuel Medernach

Hello Guix !

How do you share profiles among machines ? For instance 2 users wants to 
have the same profile, user A shares the directory 
/gnu/store/...-profile to user B, user B either get access to it 
directly or from a remote machine with a  "guix copy ", user B 
could now use this profile like this:


 export GUIX_PROFILE="/gnu/store/...-profile"
 source "$GUIX_PROFILE/etc/profile"

But there is a problem: this profile is not listed with

 guix package --list-profiles
 guix gc --list-roots

The problem is that if user A deletes this profile it gets garbage 
collected even if user B still needs to use it.


So the question is: How user B could add an existing 
/gnu/store/...-profile (either existing directory or obtained from a 
guix copy) to the profile and root list ?


Cheers,

Emmanuel