Bug 1711646

Summary: Scriptlet error when updating through SSH
Product: [Fedora] Fedora Reporter: David Auer <dreua>
Component: ibus-typing-boosterAssignee: Mike FABIAN <mfabian>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: anish.developer, i18n-bugs, mfabian, shawn.p.huang, tfujiwar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description David Auer 2019-05-19 09:20:48 UTC
Description of problem:
When I update or reinstall ibus-1.5.20-4.fc30 over SSH, dnf outputs the error "X11 connection rejected because of wrong authentication.".

This is caused by https://src.fedoraproject.org/rpms/ibus/blob/master/f/ibus.spec#_338
running `sudo ibus write-cache --system` results in the same error when called over SSH.

Version-Release number of selected component (if applicable):
ibus-1.5.20-4.fc30

How reproducible:
Always over SSH, never when using the terminal directly on the machine.

Steps to Reproduce:
1. Reinstall or update to ibus-1.5.20-4.fc30

Actual results:
  Running scriptlet: ibus-1.5.20-4.fc30.x86_64         
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
  Verifying        : ibus-1.5.20-4.fc30.x86_64     


Expected results:
  Running scriptlet: ibus-1.5.20-4.fc30.x86_64             
  Verifying        : ibus-1.5.20-4.fc30.x86_64

Comment 1 fujiwara 2019-05-20 06:53:35 UTC
> running `sudo ibus write-cache --system` results in the same error when called over SSH.

I cannot reproduce your problem. The `ibus write-cache` does not use the X11 connection.
Probably I guess one of your IBus engines could use the X11 connection but not ibus core.

You can move all xml files in /usr/share/ibus/component/ and run the command again so that you check which xml file effects your problem.

Comment 2 David Auer 2019-05-20 12:28:07 UTC
It's caused by ibus-typing-booster-2.6.1-1. Changing the component accordingly.
Thanks for your help, fujiwara!

The problem also occurs on (re)installing ibus-typing booster as it has the same scriptlets.

Comment 3 fujiwara 2019-07-12 03:34:28 UTC
I think this is a bug.

Comment 4 Mike FABIAN 2019-09-16 20:20:12 UTC
I cannot reproduce this.

Comment 5 David Auer 2019-09-16 22:53:25 UTC
I just found out that it only happens when X11 forwarding is active. (I have this as default for my own machines so I didn't realize it earlier.)

If you want to reproduce you will need:

 - On your host in /etc/ssh/sshd_config:
   X11Forwarding yes

 - Restart sshd (Untested: sudo systemctl restart sshd)

 - Ssh into your machine (client and host can be the same or different machines) with the -X flag.

 - sudo dnf reinstall ibus-typing-booster


I see now, that this is quite an edge-case so feel free to just close this as wontfix if you do not want to spend time on it.

Comment 6 fujiwara 2019-09-17 04:40:58 UTC
I can see the "Connection refused" warnings:

```
# /usr/libexec/ibus-engine-typing-booster --xml
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
<engines>
    <engine>
        <name>typing-booster</name>
        <longname>Typing Booster</longname>
        <language>t</language>
...
</engines>
```

Comment 7 Mike FABIAN 2019-12-03 07:59:46 UTC
(In reply to fujiwara from comment #6)
> I can see the "Connection refused" warnings:
> 
> ```
> # /usr/libexec/ibus-engine-typing-booster --xml
> Unable to init server: Could not connect: Connection refused
> Unable to init server: Could not connect: Connection refused
> <engines>
>     <engine>
>         <name>typing-booster</name>
>         <longname>Typing Booster</longname>
>         <language>t</language>
> ...
> </engines>

Unfortunately I cannot reproduce this.

Comment 8 Mike FABIAN 2019-12-17 06:04:07 UTC
$ env -u DISPLAY /usr/libexec/ibus-engine-typing-booster --xml
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
<engines>
    <engine>
        <name>typing-booster</name>
        <longname>Typing Booster</longname>
        <language>t</language>
        <license>GPL</license>
        <author>Mike FABIAN &lt;mfabian@redhat.com&gt;, Anish Patil &lt;anish.developer@gmail.
com&gt;</author>
        <icon>/usr/share/ibus-typing-booster/icons/ibus-typing-booster.svg</icon>
        <layout>default</layout>
        <description>A completion input method to speedup typing.</description>
        <symbol>🚀</symbol>
        <setup>/usr/libexec/ibus-setup-typing-booster</setup>
        <icon_prop_key>InputMode</icon_prop_key>
    </engine>
</engines>