p-e-w / shin

A shell in every text input on your system
GNU General Public License v3.0
278 stars 12 forks source link

Set global engine failed: Timeout was reached #6

Closed 0x4c756e61 closed 2 years ago

0x4c756e61 commented 2 years ago

Hello, I installed shin and ibus, bound ibus engine shin to a keybaord shortcut in KDE (ALT+SHIT+ENTER) but I still can't manage to run any commands, further more running it in a terminal errors me:

(process:2963): IBUS-WARNING **: 13:20:25.972: ibus_bus_call_sync: org.freedesktop.IBus.SetGlobalEngine: GDBus.Error:org.freedesktop.DBus.Error.Failed: Set global engine failed: Timeout was reached
Failed to configure global engine.

What am I doing wrong ?

What I run:

Distro       : Artix linux
init System  : runit
DE           : latest kde plasma 
IBUS         : IBus 1.5.27
Shin         : shin-git-1.0.0.r1.g7373a4f-1 (From the aur)

Thanks for the help.

p-e-w commented 2 years ago

Please run ibus-daemon --replace --verbose in a terminal, then run ibus engine shin in another terminal, then copy and paste the output from the first terminal.

This should tell us what's happening during startup. Shin has fairly detailed logging, so I expect to see an error message.

0x4c756e61 commented 2 years ago

No error messages here

[Shin] 2022/10/27 15:43:45 Starting
[Shin] 2022/10/27 15:43:45 Started
0x4c756e61 commented 2 years ago

restarting it another time doesn't give same output

[Shin] 2022/10/27 15:44:28 updateText(text = '', cursorPos = 0)
[Shin] 2022/10/27 15:44:28 Exiting

(ibus-ui-gtk3:10639): IBUS-WARNING **: 15:44:29.041: ibus_bus_call_sync: org.freedesktop.DBus.Properties.Get: GDBus.Error:org.freedesktop.DBus.Error.Failed: No global engine.
p-e-w commented 2 years ago

So Shin does start normally, yet ibus engine shin times out. Sounds like the IBus daemon cannot reach the engine over DBus or something.

OK, let's try a few more things:

First, please reinstall Shin from source as described in the README. This will give you much more detailed logging, and also eliminate the AUR package as a potential cause of the problem.

Then run the above procedure again and check the output. There should be additional events in the log.

Also, run ps auxw | grep ibus and ps auxw | grep shin. Perhaps there is something fishy with the arguments used to start the various IBus processes.

Do you have other IBus engines active/shown in the KDE input method switcher? Do these work? Try Typing Booster or Pinyin for example.

0x4c756e61 commented 2 years ago

Ibus logs

[Shin] 2022/10/28 09:54:03 Starting
[Shin] 2022/10/28 09:54:03 Started
[Shin] 2022/10/28 09:54:03 Creating engine 1
[Shin] 2022/10/28 09:54:03 FocusIn()
[Shin] 2022/10/28 09:54:03 Enable()
[Shin] 2022/10/28 09:54:03 SetCapabilities(cap = 41)

ps auxw | grep ibus

7256  0.1  0.1 308380 10644 pts/1    Sl+  09:53   0:00 ibus-daemon --replace --verbose
7260  0.0  0.1 233356  9124 pts/1    Sl+  09:53   0:00 /usr/lib/ibus/ibus-dconf
7261  0.2  0.4 495312 32200 pts/1    Sl+  09:53   0:00 /usr/lib/ibus/ibus-ui-gtk3
7262  2.8  0.3 265660 28240 pts/1    Sl+  09:53   0:01 /usr/lib/ibus/ibus-extension-gtk3
7264  0.0  0.1 233188  8324 ?        Sl   09:53   0:00 /usr/lib/ibus/ibus-portal
7279  0.0  0.1 159536  9008 pts/1    Sl+  09:53   0:00 /usr/lib/ibus/ibus-engine-simple
7344  0.0  0.1 1085980 9520 pts/1    Sl+  09:54   0:00 /usr/share/ibus-shin/shin
7374  0.0  0.0   6588  2500 pts/2    S+   09:54   0:00 grep --color=auto ibus

ps auxw | grep shin

7344  0.0  0.1 1085980 9520 pts/1    Sl+  09:54   0:00 /usr/share/ibus-shin/shin
7502  0.0  0.0   6588  2428 pts/2    S+   09:56   0:00 grep --color=auto shin

I don't have any other Ibus engines besides Other - Shin

p-e-w commented 2 years ago

So IBus starts Shin, and creates an engine, and calls multiple methods on the engine interface, but then still complains it's timing out?!?

That's extremely weird. I can only speculate that something must be wrong with your IBus setup (or perhaps with DBus). Please install another IBus engine (such as Typing Booster or Pinyin) and check whether ibus engine [name] works with those (you can find the engine names using ibus list-engine).

0x4c756e61 commented 2 years ago

After installing Typing booster, and all the libraries it needs it works fine, opening the word menu and underlying my text. Here's the logs After launching the Ibus deamon and before running shin

[Shin] 2022/10/29 10:50:29 Starting
[Shin] 2022/10/29 10:50:29 Started
[Shin] 2022/10/29 10:50:29 Creating engine 1
[Shin] 2022/10/29 10:50:29 FocusIn()
[Shin] 2022/10/29 10:50:29 Enable()
[Shin] 2022/10/29 10:50:29 SetCapabilities(cap = 41)

after launching shin

[Shin] 2022/10/29 10:51:04 Starting
[Shin] 2022/10/29 10:51:04 Started
[Shin] 2022/10/29 10:51:04 Creating engine 1
[Shin] 2022/10/29 10:51:04 FocusIn()
[Shin] 2022/10/29 10:51:04 Enable()
[Shin] 2022/10/29 10:51:04 SetCapabilities(cap = 41)
[Shin] 2022/10/29 10:51:06 Creating engine 2
[Shin] 2022/10/29 10:51:06 FocusOut()
[Shin] 2022/10/29 10:51:06 updateText(text = '', cursorPos = 0)
[Shin] 2022/10/29 10:51:06 Exiting
[Shin] 2022/10/29 10:51:06 Disable()
[Shin] 2022/10/29 10:51:06 Destroy()
[Shin] 2022/10/29 10:51:06 FocusIn()
[Shin] 2022/10/29 10:51:06 Enable()
[Shin] 2022/10/29 10:51:06 SetCapabilities(cap = 41)

(ibus-ui-gtk3:3468): IBUS-WARNING **: 10:51:06.781: ibus_bus_call_sync: org.freedesktop.DBus.Properties.Get: GDBus.Error:org.freedesktop.DBus.Error.Failed: No global engine.
p-e-w commented 2 years ago

After launching the Ibus deamon and before running shin

The log already shows Shin entries before running Shin? Something is very wrong here. Clearly, Shin has already been started without your doing somehow.

Did you add Shin to the desktop's input method switcher? Is it listed as an input method in the IBus panel? If so, you should remove it.

I'm running out of ideas here. Nothing that's happening in your setup matches my understanding of how IBus works, and I've successfully set up Shin on KDE without any problems. I don't know what else to try.

0x4c756e61 commented 2 years ago

I did remove it from the Ibus panel, but it's still not working. Well thanks anyways.

p-e-w commented 2 years ago

Sorry it did not work for you :disappointed:

0x4c756e61 commented 1 year ago

No problem, maybe it will magically work on my setup some day