all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Guix, Rofi, i3wm and Locales
@ 2018-10-13 11:08 Pierre-Henry F.
  2018-10-15 12:13 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre-Henry F. @ 2018-10-13 11:08 UTC (permalink / raw)
  To: help-guix@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1256 bytes --]

Hello,

I had a problem with an i3wm keybinding which called a bash script which called a command (Rofi) installed with Guix.
I uninstalled rofi with Guix, installed it again with apt and it worked fine:

https://github.com/DaveDavenport/rofi/issues/865#issuecomment-429532113 :
```
> Setup your locale correctly?
>
> It feels like your environment is pretty broken.
>
> (p.s. there should not be a space after !.)

my locale:

    export LANG="en_US.UTF-8"
    export LC_CTYPE="en_US.UTF-8"
    export LC_NUMERIC="en_US.UTF-8"
    export LC_TIME="en_US.UTF-8"
    export LC_COLLATE="en_US.UTF-8"
    export LC_MONETARY="en_US.UTF-8"
    export LC_MESSAGES="en_US.UTF-8"
    export LC_ALL="en_US.UTF-8"

I uninstalled rofi with: `$ guix package -r rofi` then installed it using `$ sudo apt install rofi` and it's working just fine...

Apprently, installing with guix (`$ guix package -i rofi`) messes with `export LC_ALL=...` and the likes...

Thank you.
```

If any of you have an idea of why this happened, I would be happy to know since I'm trying to manage my packages with Guix
and hope that it will be of great help in the future.

Thank you.

Best regards,
Pierre-Henry FRÖHRING
+33 6 34 48 17 57
contact@phfrohring.com
Skype: pierre.henry.frohring

[-- Attachment #2: Type: text/html, Size: 2321 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Guix, Rofi, i3wm and Locales
  2018-10-13 11:08 Guix, Rofi, i3wm and Locales Pierre-Henry F.
@ 2018-10-15 12:13 ` Ludovic Courtès
  2018-10-15 22:00   ` Pierre-Henry F.
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2018-10-15 12:13 UTC (permalink / raw)
  To: Pierre-Henry F.; +Cc: help-guix@gnu.org

Hello,

"Pierre-Henry F." <contact@phfrohring.com> skribis:

> I had a problem with an i3wm keybinding which called a bash script which called a command (Rofi) installed with Guix.
> I uninstalled rofi with Guix, installed it again with apt and it worked fine:

[...]

> Apprently, installing with guix (`$ guix package -i rofi`) messes with `export LC_ALL=...` and the likes...

Most likely the problem comes with locale setup for Guix:

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

Packages installed with Guix do not use locale data provided by the
underlying distro, which is why you have to follow the steps described
in the page above to make sure that they have access to locale data.

Does installed ‘glibc-utf8-locales’ and setting ‘GUIX_LOCPATH’ help?

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Guix, Rofi, i3wm and Locales
  2018-10-15 12:13 ` Ludovic Courtès
@ 2018-10-15 22:00   ` Pierre-Henry F.
  2018-10-16 11:47     ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre-Henry F. @ 2018-10-15 22:00 UTC (permalink / raw)
  To: ludo@gnu.org; +Cc: help-guix\@gnu.org

Hi Ludo (sorry for this duplicate...),

I checked that I executed the commands:

  $ guix package -i glibc-locales
  $ export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale

Then:

  $ sudo apt remove rofi
  $ guix package -i rofi

But no... same result.

Yet:

  $ which rofi /home/phf/.guix-profile/bin/rofi
  $ rofi -combi-modi window,drun,run -theme solarized -font 'hack 10' -show combi -modi combi
  # Works as expected

Thanks for looking into this,
Pierre-Henry FRÖHRING
+33 6 34 48 17 57
contact@phfrohring.com
Skype: pierre.henry.frohring




‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, October 15, 2018 2:13 PM, <ludo@gnu.org> wrote:

> Hello,
>
> "Pierre-Henry F." contact@phfrohring.com skribis:
>
> > I had a problem with an i3wm keybinding which called a bash script which called a command (Rofi) installed with Guix.
> > I uninstalled rofi with Guix, installed it again with apt and it worked fine:
>
> [...]
>
> > Apprently, installing with guix (`$ guix package -i rofi`) messes with `export LC_ALL=...` and the likes...
>
> Most likely the problem comes with locale setup for Guix:
>
> https://www.gnu.org/software/guix/manual/en/html_node/Application-Setup.html
>
> Packages installed with Guix do not use locale data provided by the
> underlying distro, which is why you have to follow the steps described
> in the page above to make sure that they have access to locale data.
>
> Does installed ‘glibc-utf8-locales’ and setting ‘GUIX_LOCPATH’ help?
>
> Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Guix, Rofi, i3wm and Locales
  2018-10-15 22:00   ` Pierre-Henry F.
@ 2018-10-16 11:47     ` Ludovic Courtès
  2018-10-16 12:03       ` Pierre-Henry F.
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2018-10-16 11:47 UTC (permalink / raw)
  To: Pierre-Henry F.; +Cc: help-guix@gnu.org

Hi,

"Pierre-Henry F." <contact@phfrohring.com> skribis:

> I checked that I executed the commands:
>
>   $ guix package -i glibc-locales
>   $ export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
>
> Then:
>
>   $ sudo apt remove rofi
>   $ guix package -i rofi
>
> But no... same result.

Concretely, if you explicitly run ~/.guix-profile/bin/rofi, what
happens?  Does it print warnings about locale issues?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Guix, Rofi, i3wm and Locales
  2018-10-16 11:47     ` Ludovic Courtès
@ 2018-10-16 12:03       ` Pierre-Henry F.
  2018-10-17 12:13         ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre-Henry F. @ 2018-10-16 12:03 UTC (permalink / raw)
  To: ludo@gnu.org; +Cc: help-guix\@gnu.org




Cordialement,
Pierre-Henry FRÖHRING
+33 6 34 48 17 57
contact@phfrohring.com
Skype: pierre.henry.frohring

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, October 16, 2018 1:47 PM, <ludo@gnu.org> wrote:

> Hi,
>
> "Pierre-Henry F." contact@phfrohring.com skribis:
>
> > I checked that I executed the commands:
> > $ guix package -i glibc-locales
> > $ export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
> > Then:
> > $ sudo apt remove rofi
> > $ guix package -i rofi
> > But no... same result.
>
> Concretely, if you explicitly run ~/.guix-profile/bin/rofi, what
> happens? Does it print warnings about locale issues?

I replaced things in the calling script:

  #! /usr/bin/env bash
  ~/.guix-profile/bin/rofi -combi-modi window,drun,run -theme solarized -font 'hack 10' -show combi -modi combi

And... nothing happens!

>
> Thanks,
> Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Guix, Rofi, i3wm and Locales
  2018-10-16 12:03       ` Pierre-Henry F.
@ 2018-10-17 12:13         ` Ludovic Courtès
  2018-10-17 19:29           ` Pierre-Henry F.
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2018-10-17 12:13 UTC (permalink / raw)
  To: Pierre-Henry F.; +Cc: help-guix@gnu.org

Hi,

"Pierre-Henry F." <contact@phfrohring.com> skribis:

>> Concretely, if you explicitly run ~/.guix-profile/bin/rofi, what
>> happens? Does it print warnings about locale issues?
>
> I replaced things in the calling script:
>
>   #! /usr/bin/env bash
>   ~/.guix-profile/bin/rofi -combi-modi window,drun,run -theme solarized -font 'hack 10' -show combi -modi combi
>
> And... nothing happens!

You mean you no longer get the warning issues?  (I was suggesting running
the command directly at the prompt rather than in a script, to make sure
nothing is interfering.)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Guix, Rofi, i3wm and Locales
  2018-10-17 12:13         ` Ludovic Courtès
@ 2018-10-17 19:29           ` Pierre-Henry F.
  2018-10-24 14:13             ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre-Henry F. @ 2018-10-17 19:29 UTC (permalink / raw)
  To: ludo@gnu.org; +Cc: help-guix\@gnu.org

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, October 17, 2018 2:13 PM, <ludo@gnu.org> wrote:

> Hi,
>
> "Pierre-Henry F." contact@phfrohring.com skribis:
>
> > > Concretely, if you explicitly run ~/.guix-profile/bin/rofi, what
> > > happens? Does it print warnings about locale issues?
> >
> > I replaced things in the calling script:
> > #! /usr/bin/env bash
> > ~/.guix-profile/bin/rofi -combi-modi window,drun,run -theme solarized -font 'hack 10' -show combi -modi combi
> > And... nothing happens!
>
> You mean you no longer get the warning issues? (I was suggesting running
> the command directly at the prompt rather than in a script, to make sure
> nothing is interfering.)

I did and it works fine from the command line...
The problem occurs only when the script is triggered from the i3 shortcut.
i3 was not installed from Guix... I will try to install i3 with Guix and try
again.

Below is all I have on this bug so far:


# Guix

```
$ guix --version
guix (GNU Guix) 2ab321ca37d1c00c1540d78d587226d3d487b2d4
Copyright (C) 2018 the Guix authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
```

```
$ guix package -i glibc-utf8-locales
The following package will be upgraded:
   glibc-utf8-locales	2.27 → 2.27	/gnu/store/mbns811n696fl7g060cx6jqjh75mlj8i-glibc-utf8-locales-2.27

14 packages in profile
```

```
$ echo $GUIX_LOCPATH
/home/phf/.guix-profile/lib/locale
```

```
$ guix package -I rofi
rofi	1.5.1	out	/gnu/store/4g9m8lv9bqpcb7k4rvscyb7g5yga8zq2-rofi-1.5.1
```

# Rofi

```
$ rofi -v
Version: 1.5.1
```

rofi configuration: https://gist.github.com/phfrohring/237f89df2b2e2a7f25e5a01bf2549729

From: `$ G_MESSAGES_DEBUG=all /home/phf/.guix-profile/bin/rofi -combi-modi window,drun,run,ssh -theme solarized -font 'hack 10' -show combi -modi combi &> ~/rofi_logs/rofi_$(date +'%F-%k-%M-%S')`
To: [Logs](https://gist.github.com/phfrohring/a6d68a007377e8f1f2de73a6cb69583e)

But the logs becomes:
    `(process:12536): Rofi-WARNING **: 21:08:53.715: Failed to set locale.`

when called using the i3 shortcut `$mod+d` that calls the `trigger_rofi` script holding the line above: `$ G_MESSAGES …`


# i3

No compositor used.

```
$ i3 --moreversion 2>&-
Binary i3 version:  4.15 (2018-03-10) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.15 (2018-03-10) (pid 1394)o abort…)
Loaded i3 config: /home/phf/.config/i3/config (Last modified: Thu 11 Oct 2018 09:03:19 PM CEST, 3547 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
```

relevant line of i3 config: `bindsym --release $mod+d exec ~/bin/./trigger_rofi`

content of `~/bin/./trigger_rofi`:

```
#! /usr/bin/env bash
rofi -combi-modi window,drun,run,ssh -theme solarized -font 'hack 10' -show combi -modi combi
```

```
$ i3-msg shmlog on; i3-msg debuglog on
[{"success":true}]
[{"success":true}]



# type the keybinding that should trigger rofi

$ i3-dump-log >~/i3_logs/i3log-$(date +'%F-%k-%M-%S') 2>&1

$ i3-msg shmlog off; i3-msg debuglog off
[{"success":true}]
[{"success":true}]
```

[log gist](https://gist.github.com/phfrohring/f5556e14499b49ceaa8e1ba0276638a9)

Lines of the log that shows the executed command that does not work properly:

```
13/10/2018 11:04:54 - commands_parser.c:parse_command:265 - COMMAND: *exec ~/bin/./trigger_rofi*
13/10/2018 11:04:54 - commands.c:cmd_criteria_init:155 - Initializing criteria, current_match = 0x561b103e8100
13/10/2018 11:04:54 - commands.c:cmd_exec:1235 - should execute ~/bin/./trigger_rofi, no_startup_id = 0
13/10/2018 11:04:54 - startup id = i3/~|bin|.|trigger_rofi/1388-56-f02c_TIME27690841
13/10/2018 11:04:54 - executing: ~/bin/./trigger_rofi
```



# Linux distribution

```
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic
```



# Steps to reproduce

typing `$mod+d` won't trigger rofi.



# What behaviour you see

Nothing.



# What behaviour you expect to see

The same behaviour as when I execute: `$ ~/bin/./trigger_rofi` i.e. rofi to show up.


Many thanks!
PH

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Guix, Rofi, i3wm and Locales
  2018-10-17 19:29           ` Pierre-Henry F.
@ 2018-10-24 14:13             ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2018-10-24 14:13 UTC (permalink / raw)
  To: Pierre-Henry F.; +Cc: help-guix@gnu.org

Hello,

"Pierre-Henry F." <contact@phfrohring.com> skribis:

> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Wednesday, October 17, 2018 2:13 PM, <ludo@gnu.org> wrote:
>
>> Hi,
>>
>> "Pierre-Henry F." contact@phfrohring.com skribis:
>>
>> > > Concretely, if you explicitly run ~/.guix-profile/bin/rofi, what
>> > > happens? Does it print warnings about locale issues?
>> >
>> > I replaced things in the calling script:
>> > #! /usr/bin/env bash
>> > ~/.guix-profile/bin/rofi -combi-modi window,drun,run -theme solarized -font 'hack 10' -show combi -modi combi
>> > And... nothing happens!
>>
>> You mean you no longer get the warning issues? (I was suggesting running
>> the command directly at the prompt rather than in a script, to make sure
>> nothing is interfering.)
>
> I did and it works fine from the command line...
> The problem occurs only when the script is triggered from the i3 shortcut.
> i3 was not installed from Guix... I will try to install i3 with Guix and try
> again.

Yes, please.  We have our share of bugs to fix so I won’t offer to fix
those of your other distro.  ;-)

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-10-24 14:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-13 11:08 Guix, Rofi, i3wm and Locales Pierre-Henry F.
2018-10-15 12:13 ` Ludovic Courtès
2018-10-15 22:00   ` Pierre-Henry F.
2018-10-16 11:47     ` Ludovic Courtès
2018-10-16 12:03       ` Pierre-Henry F.
2018-10-17 12:13         ` Ludovic Courtès
2018-10-17 19:29           ` Pierre-Henry F.
2018-10-24 14:13             ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.