[gnome-schedule] add XAUTHORITY variable pointing to ~/.Xauthority
- From: Gaute Hope <gauteh src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-schedule] add XAUTHORITY variable pointing to ~/.Xauthority
- Date: Mon, 11 May 2009 11:02:27 -0400 (EDT)
commit d7ddc70e50abb937311bce3a6fdda9093ecf7562
Author: Gaute Hope <eg gaute vetsj com>
Date: Mon May 11 17:01:34 2009 +0200
add XAUTHORITY variable pointing to ~/.Xauthority
---
src/xwrapper.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/xwrapper.py b/src/xwrapper.py
index 0f99160..58a7e10 100755
--- a/src/xwrapper.py
+++ b/src/xwrapper.py
@@ -32,9 +32,10 @@ import crontab
import gettext
gettext.install(config.GETTEXT_PACKAGE(), config.GNOMELOCALEDIR(), unicode=1)
-def check_X (display):
- #Checking if I can use X
+def check_X (display, xauth):
+ # Checking if I can use X
os.putenv ('DISPLAY', display)
+ os.putenv ('XAUTHORITY', xauth)
try:
import pygtk
@@ -129,12 +130,15 @@ if job_type == 0:
print _("len(display)<2: No proper DISPLAY variable")
sys.exit (1)
+ # TODO: Can/Does this change ?
+ xauth = home_dir + "/.Xauthority"
- check_X (display)
+ check_X (display, xauth)
# Execute task
sh = os.popen ("/bin/sh -s", 'w')
sh.write ("export DISPLAY=" + display + "\n")
+ sh.write ("export XAUTHORITY=" + xauth + "\n")
sh.write (command + "\n")
sh.close ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]