~ubuntu-branches/debian/wheezy/gtg/wheezy

2.2.13 by Luca Falavigna
* debian/patches/*.patch:
1
Description: Check if a display is available instead of relying on xset
2
Origin: http://bazaar.launchpad.net/~gtg/gtg/trunk/revision/877
2.2.11 by Luca Falavigna
* debian/patches/x_is_running.patch:
3
4
Index: gtg-0.2.4/gtg
5
===================================================================
6
--- gtg-0.2.4.orig/gtg	2010-09-05 02:08:29.896400600 +0200
7
+++ gtg-0.2.4/gtg	2010-09-05 11:44:11.639955308 +0200
8
@@ -32,10 +32,13 @@
9
 from optparse import OptionParser
10
 
11
 def X_is_running():
12
-    from subprocess import Popen, PIPE
13
-    p = Popen(["xset", "-q"], stdout=PIPE, stderr=PIPE)
14
-    p.communicate()
15
-    return p.returncode == 0
16
+    from gtk.gdk import Screen
17
+    try:
18
+        if Screen().get_display():
19
+            return True
20
+    except RuntimeError:
21
+        pass
22
+    return False
23
 
24
 try:
25
     parser = OptionParser()