[Uim-bugs] [Bug 39242] New: no easy way to wait until uim-xim is ready
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Jul 14 18:26:37 PDT 2011
https://bugs.freedesktop.org/show_bug.cgi?id=39242
Summary: no easy way to wait until uim-xim is ready
Product: UIM
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: enhancement
Priority: medium
Component: bridge: XIM
AssignedTo: uim-bugs at freedesktop.org
ReportedBy: d+bugzilla at vdr.jp
[ this is forwarded from http://bugs.debian.org/300486 ]
When using loading uim-xim and another program that needs to use it one
right after the other (e.g. in an .xsession) programs started after
uim-xim but before uim-xim is ready to service them can't use uim.
This comes up for me if I try to make an .xsession that looks something
like this:
uim-xim &
xterm
The xterm loads up after uim-xim has been started, but before it's ready
to accept connections from XIM clients. I can fix this by doing:
uim-xim &
sleep N
xterm
Where N=1 on most machines (like this one, a new amd64), but N=2 or 3 on some
really slow machines (notably, a heavily loaded PII-450 I have, so we're not
just saying hypothetically!)
It would be nice if there were an option to/wrapper for uim-xim that
allowed it to daemonize itself and only return to the caller when it was
not only daemonized, but actually ready to accept XIM clients. Then the
proposed .xsession could be something like:
uim-xim --daemonize
xterm
And everything would work nicely. =)
--------------------------------------------------
I was facing problem of starting uim-toolbar-gtk just like this bug
report.
My workaround of not really waiting ...
Wait short --> uim-toolbar-gtk does not work
---
uim-xim &
sleep 1
uim-toolbar-gtk &
----
Waiting long --> uim-toolbar-gtk works
---
uim-xim &
sleep 10
uim-toolbar-gtk &
----
Waiting smart --> uim-toolbar-gtk works
---
uim-xim &
(sleep 10 ; uim-toolbar-gtk ) &
----
So if the original bug reporter wishes xterm to start a bit later, there
is a decent work around which does not really slow down X start up.
--------------------------------------------------
Xlib provides the way to do this, which is XRegisterIMInstantiateCallback.
It is up to clients to decide what should be done when an IM server is not
available.
--------------------------------------------------
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the uim-bugs
mailing list