Gentoo Archives: gentoo-dev

From: Christopher Harvey <chris@××××××××××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] showing file diffs as root
Date: Sun, 30 May 2010 15:00:23
Message-Id: 4C027D51.6010101@basementcode.com
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Hello gentoo-dev,
5
6 I'm working on an app for GSoC that needs to show a diff of two files
7 to the user. Right now I've just been calling meld from the python
8 os.system call. I tried running my application as root to show diffs
9 of system files that belong to root. I got this error:
10
11 Traceback (most recent call last):
12 File "/usr/bin/meld", line 90, in <module>
13 meldapp.main()
14 File "/usr/lib/meld/meldapp.py", line 982, in main
15 app = MeldApp()
16 File "/usr/lib/meld/meldapp.py", line 562, in __init__
17 self.prefs = MeldPreferences()
18 File "/usr/lib/meld/meldapp.py", line 435, in __init__
19 super(MeldPreferences, self).__init__("/apps/meld", self.defaults)
20 File "/usr/lib/meld/prefs.py", line 92, in __init__
21 self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
22 glib.GError: Failed to contact configuration server; some possible
23 causes are that you need to enable TCP/IP networking for ORBit, or you
24 have stale NFS locks due to a system crash. See
25 http://projects.gnome.org/gconf/ for information. (Details - 1:
26 Failed to get connection to session: Did not receive a reply. Possible
27 causes include: the remote application did not send a reply, the
28 message bus security policy blocked the reply, the reply timeout
29 expired, or the network connection was broken.)
30
31 I haven't looked into why this is happening very much because calling
32 os.system("meld file1 file2 &") in python is putting up so many red
33 flags in my head it's not funny. If anybody could tell me the proper
34 gentoo/linux/python way to present a root level diff to a user running
35 a program through su or sudo I'd really appreciate the help.
36
37 thanks,
38 Chris
39
40 - --
41 My GnuPGP key at:
42 www.basementcode.com/public_key.txt
43 -----BEGIN PGP SIGNATURE-----
44 Version: GnuPG v2.0.14 (GNU/Linux)
45 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
46
47 iQEcBAEBAgAGBQJMAn1RAAoJEDqfZIFeqFH7brQH/RqeUmCHuopa+SufkzNNT4Ys
48 7IJArQCik3vBLJLpeTM3gf3NL3KMWjyzlxxQ8L74KAhItPuA3cVUQKQrSnOCBiDa
49 y6yfDttBbOptOtcUYn7WkXQDm+BYEdpviMfjtym5ZF2nlGOMzZMxknP4ywXnhLZN
50 q2169haoG0p1g0D11q2H9B4Vk++PUil7VLgzOfAOcLQ9YpFDkXIdxy5FRaRkx8K4
51 lcPfmzFha8OkdBpsXPJdhtY5pmzOEf+ziprDlyD7eCkE1xAkRNhjsNtEz9CTXeLh
52 l46/tUCZTx+aX9ABW0m13Ache8jGN36+TvsRzRKfzqaMJ0z/wEOeESooPFYHnl0=
53 =FxxJ
54 -----END PGP SIGNATURE-----

Replies

Subject Author
Re: [gentoo-dev] showing file diffs as root "Domen Kožar" <domen@×××.si>
Re: [gentoo-dev] showing file diffs as root Sebastian Pipping <sping@g.o>
Re: [gentoo-dev] showing file diffs as root Francesco R <vivo75@×××××.com>
Re: [gentoo-dev] showing file diffs as root Gilles Dartiguelongue <eva@g.o>