Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 56157
Alias:
Product:
Component:
Status: RESOLVED
Resolution: DUPLICATE of bug 66255
Assigned To: Mobile Herd <mobile@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ioannis Aslanidis <deathwing00@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
bluepin.patch bluepin.patch patch Ioannis Aslanidis 2005-04-02 09:08 0000 455 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 56157 depends on: 35987 Show dependency tree
Bug 56157 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-07-05 11:39 0000
This bug is related to bug 35987.

It seems that the patch of bug 35987 only works for xfree, but it does not work with xorg-x11. Even though, it could be that the patch was not included in the latest version.

REPORT BELOW:

*  net-wireless/bluez-utils
      Latest version available: 2.7
      Latest version installed: 2.7
      Size of downloaded files: 276 kB
      Homepage:    http://bluez.sourceforge.net/
      Description: bluetooth utilities
      License:     GPL-2

# 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


Reproducible: Always
Steps to Reproduce:
1. /usr/bin/bluepin

------- Comment #1 From Alastair Tse (RETIRED) 2004-07-06 05:28:46 0000 -------
i don't think bluepin can be called via the commandline like that, are you sure
it doesn't launch from hcid?

------- Comment #2 From Ioannis Aslanidis 2004-07-06 05:54:31 0000 -------
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 :)

------- Comment #3 From Alastair Tse (RETIRED) 2004-07-06 06:22:17 0000 -------
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. 

------- Comment #4 From Ioannis Aslanidis 2004-07-06 06:25:06 0000 -------
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


-----

------- Comment #5 From Martin Schönn 2004-07-09 10:38:00 0000 -------
I get the exact same error as Deathwing00

------- Comment #6 From Ioannis Aslanidis 2004-07-09 10:39:48 0000 -------
Use /etc/bluetooth/pin as a workaround... but also have a look at bug 35987

------- Comment #7 From Florian Ehrenthal 2004-08-16 14:26:13 0000 -------
i had the same problem, but after installing pygtk-2.2 it forked nicely
so this is probably a version problem

------- Comment #8 From Alastair Tse (RETIRED) 2004-09-21 16:08:16 0000 -------
can't really hurt bumpign the dep to pygtk-2.2, committing this to 2.10-r1

------- Comment #9 From Ioannis Aslanidis 2004-10-17 04:15:21 0000 -------
Verified.

------- Comment #10 From Henrik Brix Andersen 2005-01-08 14:28:56 0000 -------
Closing.

------- Comment #11 From Ioannis Aslanidis 2005-04-02 08:44:18 0000 -------
*** Bug 87407 has been marked as a duplicate of this bug. ***

------- Comment #12 From Ioannis Aslanidis 2005-04-02 08:45:19 0000 -------
Looks like the problem persists.

------- Comment #13 From Ioannis Aslanidis 2005-04-02 09:08:07 0000 -------
Created an attachment (id=55111) [details]
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.

------- Comment #14 From Alastair Tse (RETIRED) 2005-04-26 05:39:15 0000 -------

*** This bug has been marked as a duplicate of 66255 ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug