Bug 835313
| Summary: | ibus-init.el flaw: forgets to test whether it runs under X | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | aeb <aeb> |
| Component: | emacs-ibus | Assignee: | Daiki Ueno <dueno> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 16 | CC: | dueno, i18n-bugs |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-07-10 16:27:27 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
ibus.el itself has such a check in ibus-mode-on:
(defun ibus-mode-on ()
"Turn ibus-mode on."
(interactive)
(if (not (or (eq window-system 'x) ; X frame
(getenv "DISPLAY"))) ; non-X frame under X session
(ibus-mode-quit)
...)
so I can't reproduce the problem. Python backtrace from abrt would be helpful.
IBus: Surrounding text support enabled
IBus: Traceback (most recent call last):
IBus: File "/usr/libexec/ibus-el-agent", line 223, in <module>
IBus: display = Xlib.display.Display()
IBus: File "/usr/lib/python2.7/site-packages/Xlib/display.py", line 83, in __init__
IBus: self.display = _BaseDisplay(display)
IBus: File "/usr/lib/python2.7/site-packages/Xlib/display.py", line 65, in __init__
IBus: apply(protocol.display.Display.__init__, (self, ) + args, keys)
IBus: File "/usr/lib/python2.7/site-packages/Xlib/protocol/display.py", line 49, in __init__
IBus: self.socket = connect.get_socket(name, host, displayno)
IBus: File "/usr/lib/python2.7/site-packages/Xlib/support/connect.py", line 79, in get_socket
IBus: return mod.get_socket(dname, host, dno)
IBus: File "/usr/lib/python2.7/site-packages/Xlib/support/unix_connect.py", line 92, in get_socket
IBus: raise error.DisplayConnectionError(dname, str(val))
IBus: Xlib.error.DisplayConnectionError: Can't connect to display "foobar:0.0": [Errno 113] No route to host
IBus:
IBus: Process ibus-agent exited abnormally with code 1
IBus: error: ("process: ibus-agent status: exit")
(In reply to comment #2) > IBus: Xlib.error.DisplayConnectionError: Can't connect to display > "foobar:0.0": [Errno 113] No route to host So, you set the invalid value to $DISPLAY on the remote server. I think this is a user error. The value of $DISPLAY was caused by a different bug. But emacs was started as "emacs -nw", so DISPLAY is irrelevant, emacs was told not to use X. As you see "non-X frame under X session" in the code quoted in comment 1, it is the situation supported by upstream. Even if you start emacs with "emacs -nw", you can still create an X frame with M-x make-frame-on-display :0. I do not mind that ibus supports this situation. But I mind that the RedHat ibus-init that is loaded by default tries to access some X server. If the user asks for something, then the consequences are for the user. If RedHat init files are such that emacs -nw tries to open a window on some remote machine, that is a serious security risk. (Situation: login from outside to a gateway machine. Then login from the gateway to an internal machine. Start emacs -nw on the internal machine. Now emacs tries to connect to X on the gateway. Ach.) OK, now I think calling ibus-mode-on in ibus-init.el is too much for users regardless of -nw option. Instead I would add autoloads for ibus-mode-on. emacs-ibus-0.3.1-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/emacs-ibus-0.3.1-2.fc17 emacs-ibus-0.3.1-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/emacs-ibus-0.3.1-2.fc16 Package emacs-ibus-0.3.1-2.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing emacs-ibus-0.3.1-2.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-10045/emacs-ibus-0.3.1-2.fc16 then log in and leave karma (feedback). emacs-ibus-0.3.1-2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. emacs-ibus-0.3.1-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: start emacs and see error messages printed by ibus Version-Release number of selected component (if applicable): emacs-ibus-0.3.1-1.fc16.noarch (bug in emacs-ibus.spec, not upstream) How reproducible: Steps to Reproduce: 1. do a remote login to a Fedora 16 machine 2. start emacs -nw on an xterm 3. see error messages Actual results: % emacs -nw IBus: Xlib.error.DisplayConnectionError: Can't connect to display "...": [Errno 113] No route to host IBus: Process ibus-agent exited abnormally with code 1 IBus: error: ("process: ibus-agent status: exit") Expected results: Correct emacs startup. Additional info: Clearly ibus expects to be started only on X. But emacs-ibus.spec creates a 2-line file ibus-init.el that starts ibus unconditionally, without testing (equal window-system 'x) or so.