https://bugzilla.redhat.com/show_bug.cgi?id=835313
Bug ID: 835313 QA Contact: extras-qa@fedoraproject.org Severity: unspecified Version: 16 Priority: unspecified CC: dueno@redhat.com, i18n-bugs@lists.fedoraproject.org Assignee: dueno@redhat.com Summary: ibus-init.el flaw: forgets to test whether it runs under X Regression: --- Story Points: --- Classification: Fedora OS: Unspecified Reporter: aeb@cwi.nl Type: Bug Documentation: --- Hardware: Unspecified Mount Type: --- Status: NEW Component: emacs-ibus Product: Fedora
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.
https://bugzilla.redhat.com/show_bug.cgi?id=835313
Daiki Ueno dueno@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(aeb@cwi.nl)
--- Comment #1 from Daiki Ueno dueno@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=835313
aeb aeb@cwi.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(aeb@cwi.nl) |
--- Comment #2 from aeb aeb@cwi.nl --- 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")
https://bugzilla.redhat.com/show_bug.cgi?id=835313
--- Comment #3 from Daiki Ueno dueno@redhat.com --- (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.
https://bugzilla.redhat.com/show_bug.cgi?id=835313
--- Comment #4 from aeb aeb@cwi.nl --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=835313
--- Comment #5 from Daiki Ueno dueno@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=835313
--- Comment #6 from aeb aeb@cwi.nl --- 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.)
https://bugzilla.redhat.com/show_bug.cgi?id=835313
Daiki Ueno dueno@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #7 from Daiki Ueno dueno@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=835313
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
https://bugzilla.redhat.com/show_bug.cgi?id=835313
--- Comment #8 from Fedora Update System updates@fedoraproject.org --- 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
https://bugzilla.redhat.com/show_bug.cgi?id=835313
--- Comment #9 from Fedora Update System updates@fedoraproject.org --- 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
https://bugzilla.redhat.com/show_bug.cgi?id=835313
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- 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... then log in and leave karma (feedback).
https://bugzilla.redhat.com/show_bug.cgi?id=835313
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Resolution|--- |ERRATA Last Closed| |2012-07-10 12:27:27
--- Comment #11 from Fedora Update System updates@fedoraproject.org --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=835313
--- Comment #12 from Fedora Update System updates@fedoraproject.org --- 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.
i18n-bugs@lists.fedoraproject.org