Summary: | bluez-utils: bluepin: patch does not work with xorg-x11 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ioannis Aslanidis (RETIRED) <deathwing00> |
Component: | New packages | Assignee: | Mobile Herd (OBSOLETE) <mobile+disabled> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | x11 |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 35987 | ||
Bug Blocks: | |||
Attachments: | bluepin.patch |
Description
Ioannis Aslanidis (RETIRED)
2004-07-05 11:39:51 UTC
i don't think bluepin can be called via the commandline like that, are you sure it doesn't launch from hcid? Hmmm... how do you expect me to do the PIN synchronization then? There is no utility that does so :( BTW, if you check bug 35987 or you google around you'll see what I mean. bluepin tries to open an X window... but hci tools are all command line, so rather not :) hcid does launch bluepin via a command line. there is some magic in the script that detects the right display that the user on the console is using and displays the window there. My hcid stays in background, but launches no bluepin... :( Am I doing anything wrong? Which is the sequence/config you follow to achieve that? ----- # hcid # bluepin Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Traceback (most recent call last): File "/usr/bin/bluepin", line 39, in ? import gtk File "/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line 43, in ? from _gtk import * RuntimeError: could not open display ----- I get the exact same error as Deathwing00 Use /etc/bluetooth/pin as a workaround... but also have a look at bug 35987 i had the same problem, but after installing pygtk-2.2 it forked nicely so this is probably a version problem can't really hurt bumpign the dep to pygtk-2.2, committing this to 2.10-r1 Verified. Closing. *** Bug 87407 has been marked as a duplicate of this bug. *** Looks like the problem persists. Created attachment 55111 [details, diff]
bluepin.patch
Looks like I've found the problem:
*****
ioannis@bluehat ~ $ bluepin
Traceback (most recent call last):
File "/usr/bin/bluepin", line 39, in ?
import gtk
ImportError: No module named gtk
ioannis@bluehat ~ $ ./bluepin
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Traceback (most recent call last):
File "./bluepin", line 39, in ?
import gtk
File "/usr/lib64/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line 37,
in ?
from _gtk import *
RuntimeError: could not open display
*****
That was caused because 'import gtk' was placed _after_ the definition of a
function. After moving 'import gtk' to top, the script works. Even though that,
I am not sure that _that_ is the correct behaviour, please, somebody test it.
The patch I've proposed performs the changes.
*** This bug has been marked as a duplicate of 66255 *** |