Package: bluez-utils
Version: 2.24-1
Severity: minor
Tags: patch

Hey,

If I am not mistaken, bluepin has to fail in any "normal" System, that
doesn't require special config options for X11-Auth. Meaning, that
normally -auth isn't provided by the XServer. So I patched bluepin to
use a default patch for the Xauthorization file.

See attached patch

Matthias

PS: Maybe you'll get another patch - which utiliases os.expandpath ...
PS: Also changed some gtk-calls to match newest calls

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages bluez-utils depends on:
ii  libbluetooth1                2.24-1      Library to use the BlueZ
Linux Blu
ii  libc6                        2.3.5-12    GNU C Library: Shared
libraries an
ii  libdbus-1-2                  0.60-5      simple interprocess
messaging syst
ii  libusb-0.1-4                 2:0.1.11-4  userspace USB programming
library
ii  module-init-tools            3.2.2-1     tools for managing Linux
kernel mo
ii  modutils                     2.4.27.0-4  Linux module utilities
ii  sysvinit                     2.86.ds1-11 System-V-like init
utilities

bluez-utils recommends no packages.

-- no debconf information

-- 
Matthias Bläsing (GPG-Schlüsselkennung: A71B4BD5)
ICQ: 84617206   AIM: linuxfun81   MSN: [EMAIL PROTECTED]

"Lächle und sei froh, es könnte schlimmer kommen" - Und er lächelte und
war froh und es kam schlimmer ...
--- bluepin	2005-08-06 13:14:13.000000000 +0200
+++ /usr/bin/bluepin	2006-01-31 16:23:35.000000000 +0100
@@ -26,9 +26,15 @@
 		elif arg[i] == "-auth":
 			auth = arg[i+1]
 			break
-
-	os.environ['DISPLAY']    = disp 
-	os.environ['XAUTHORITY'] = auth
+	ps = "/bin/ps " + proc + " --format ruser --no-headers"
+	os.environ['DISPLAY'] = disp
+	# Hack! If auth is not set for server!
+	if(not auth):
+		r,w = popen2.popen2(ps)
+		arg = string.split(r.read())
+		os.environ['XAUTHORITY'] = "/home/" + arg[0] + "/.Xauthority"
+	else:
+		os.environ['XAUTHORITY'] = auth
 
 # Set X display before initializing GTK
 set_display()
@@ -44,7 +50,7 @@
 class Dialog(gtk.Dialog):
 	result = DLG_CANCEL 
 	args = {}
-	def __init__(self, modal=gtk.FALSE, mesg=None, args = {}):
+	def __init__(self, modal=False, mesg=None, args = {}):
 		gtk.Dialog.__init__(self)
 		self.args = args
 		self.set_modal(modal)
@@ -84,7 +90,7 @@
 			l.set_text( k )
 			e.set_text( self.args[k] )
 			e.connect("key_press_event", self.key_press)
-			hbox.pack_start(l, padding = 10, expand = gtk.FALSE)
+			hbox.pack_start(l, padding = 10, expand = False)
 			hbox.pack_start(e)
 			l.show()
 			e.show()
@@ -115,13 +121,13 @@
 	def quit(self, *args):
 		self.hide()
 		self.destroy()
-		gtk.mainquit()
+		gtk.main_quit()
 
-def dialog(title, mesg, args, modal = gtk.FALSE):
+def dialog(title, mesg, args, modal = False):
 	dlg = Dialog(args = args, mesg = mesg, modal = modal)
 	dlg.set_title(title)
 	dlg.show()
-	gtk.mainloop()
+	gtk.main()
 	return dlg.result
 
 def main(*args):

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to