[prev in list] [next in list] [prev in thread] [next in thread]
List: klik-devel
Subject: [klik-devel] [klikclient commit] r966 - trunk/client/trunk
From: codesite-noreply () google ! com
Date: 2008-01-31 0:45:27
Message-ID: 00163646d97f0444f9f95c82bd1c5d26 () google ! com
[Download RAW message or body]
Author: KillerKiwi2005
Date: Wed Jan 30 16:45:00 2008
New Revision: 966
Modified:
trunk/client/trunk/install.py
Log:
Fix for mandriva
Modified: trunk/client/trunk/install.py
==============================================================================
--- trunk/client/trunk/install.py (original)
+++ trunk/client/trunk/install.py Wed Jan 30 16:45:00 2008
@@ -200,14 +200,23 @@
# check path is writable if it isn't switch to user mode
if not os.access(path, os.W_OK):
-
- # Set uid back to user instead of root / sudo, this will make xdg
work (hopefully)
- # will sudo_user work on other distros?
- if os.environ['SUDO_USER'] != None:
- print ""
- print "KDE LIVE CD DETECTED : install path is not writeable
switching to user mode"
- os.seteuid(pwd.getpwnam(os.environ['SUDO_USER'])[2])
+ os.getenv("GNOME_DESKTOP_SESSION_ID")
+ try:
+ # Set uid back to user instead of root / sudo, this will make xdg
work (hopefully)
+ # will sudo_user work on other distros?
+ if os.getenv['SUDO_USER'] != None:
+ print ""
+ print "KDE LIVE CD DETECTED : install path is not writeable
switching to user mode"
+ os.seteuid(pwd.getpwnam(os.environ['SUDO_USER'])[2])
+
+ elif os.getenv['USER'] != None:
+ print ""
+ print "KDE LIVE CD DETECTED : install path is not writeable
switching to user mode"
+ os.seteuid(pwd.getpwnam(os.environ['USER'])[2])
+ except:
+ # this failed ... we can live with it you just dont get desktop integration
+ pass
# CMG MIMETYPE
print ""
_______________________________________________
klik-devel mailing list
klik-devel@kde.org
https://mail.kde.org/mailman/listinfo/klik-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic