Commits

M0E-lnx  committed 59e64f9

Fixes bug #6

  • Participants
  • Parent commits da08fb9

Comments (0)

Files changed (1)

File modules/skel.py

 from support import widgets
 from support import dialogs
 from support.vectorlinux import SKEL
+from support.vectorlinux import USERADMIN
 from support.vectorlinux.utils import _
 
 __author__ = "Moises Henriquez"
             "\n<b>%s</b>"% _("WARNING: This cannot be undone.")
         )
         # The skel model
-        self.skelmodel = SKEL.UserSkel(os.getenv("USERNAME"))
+        wusername = None
+        # get the username
+        for acct in USERADMIN.UserModel().listUsers():
+            if acct.uid == os.geteuid():
+                wusername = acct.login
+        if not wusername:
+            return dialogs.error(
+                _("Unable to find your user name.  This is bad!"),
+                parent = self._parent
+                )
+        self.skelmodel = SKEL.UserSkel(wusername)
         self.set_description(' '.join(tx))
         self.scroll = gtk.ScrolledWindow()
         self.scroll.set_policy(