At the moment live-installer won't work in a KDE environment.
The code hangs when trying to edit the MDM or GDM config file which doesn't exist in KDE.
Check if the file exists so that live-installer works when no MDM is present:
file: installer.py
- Code: Select all
if os.path.exists("/target/etc/gdm3/daemon.conf"):
# gdm overwrite (specific to Debian/live-initramfs)
print " --> Configuring GDM"
gdmconffh = open("/target/etc/gdm3/daemon.conf", "w")
gdmconffh.write("# GDM configuration storage\n")
gdmconffh.write("\n[daemon]\n")
gdmconffh.write("\n[security]\n")
gdmconffh.write("\n[xdmcp]\n")
gdmconffh.write("\n[greeter]\n")
gdmconffh.write("\n[chooser]\n")
gdmconffh.write("\n[debug]\n")
gdmconffh.close()
elif os.path.exists("/target/etc/mdm/mdm.conf"):
# MDM overwrite (specific to Debian/live-initramfs)
print " --> Configuring MDM"
mdmconffh = open("/target/etc/mdm/mdm.conf", "w")
mdmconffh.write("# MDM configuration\n")
mdmconffh.write("\n[daemon]\n")
mdmconffh.write("\n[security]\n")
mdmconffh.write("\n[xdmcp]\n")
mdmconffh.write("\n[greeter]\n")
mdmconffh.write("\n[chooser]\n")
mdmconffh.write("\n[debug]\n")
mdmconffh.close()
Live installer localizes Firefox and Thunderbird but not LibreOffice and KDE:
- Code: Select all
# localize KDE, LibreOffice, Firefox and Thunderbird
if setup.language != "en_US":
print " --> Localizing KDE, LibreOffice, Firefox and Thunderbird"
os.system("apt-get update")
self.do_run_in_chroot("apt-get update")
locale = setup.language.replace("_", "-").lower()
# KDE
self.update_progress(total=our_total, current=our_current, message=_("Localizing KDE"))
num_res = commands.getoutput("aptitude search kde-l10n-%s | grep kde-l10n-%s | wc -l" % (locale, locale))
if num_res != "0":
self.do_run_in_chroot("apt-get install --yes --force-yes kde-l10n-" + locale)
else:
if "_" in setup.language:
language_code = setup.language.split("_")[0]
num_res = commands.getoutput("aptitude search kde-l10n-%s | grep kde-l10n-%s | wc -l" % (language_code, language_code))
if num_res != "0":
self.do_run_in_chroot("apt-get install --yes --force-yes kde-l10n-" + language_code)
# LibreOffice
self.update_progress(total=our_total, current=our_current, message=_("Localizing LibreOffice"))
num_res = commands.getoutput("aptitude search libreoffice-l10n-%s | grep libreoffice-l10n-%s | wc -l" % (locale, locale))
if num_res != "0":
self.do_run_in_chroot("apt-get install --yes --force-yes libreoffice-l10n-" + locale)
else:
if "_" in setup.language:
language_code = setup.language.split("_")[0]
num_res = commands.getoutput("aptitude search libreoffice-l10n-%s | grep libreoffice-l10n-%s | wc -l" % (language_code, language_code))
if num_res != "0":
self.do_run_in_chroot("apt-get install --yes --force-yes libreoffice-l10n-" + language_code)
self.do_run_in_chroot("apt-get install --yes --force-yes aspell-" + language_code)
# Firefox
self.update_progress(total=our_total, current=our_current, message=_("Localizing Firefox"))
num_res = commands.getoutput("aptitude search firefox-l10n-%s | grep firefox-l10n-%s | wc -l" % (locale, locale))
if num_res != "0":
self.do_run_in_chroot("apt-get install --yes --force-yes firefox-l10n-" + locale)
else:
if "_" in setup.language:
language_code = setup.language.split("_")[0]
num_res = commands.getoutput("aptitude search firefox-l10n-%s | grep firefox-l10n-%s | wc -l" % (language_code, language_code))
if num_res != "0":
self.do_run_in_chroot("apt-get install --yes --force-yes firefox-l10n-" + language_code)
# Thunderbird
self.update_progress(total=our_total, current=our_current, message=_("Localizing Thunderbird"))
num_res = commands.getoutput("aptitude search thunderbird-l10n-%s | grep thunderbird-l10n-%s | wc -l" % (locale, locale))
if num_res != "0":
self.do_run_in_chroot("apt-get install --yes --force-yes thunderbird-l10n-" + locale)
else:
if "_" in setup.language:
language_code = setup.language.split("_")[0]
num_res = commands.getoutput("aptitude search thunderbird-l10n-%s | grep thunderbird-l10n-%s | wc -l" % (language_code, language_code))
if num_res != "0":
self.do_run_in_chroot("apt-get install --yes --force-yes thunderbird-l10n-" + language_code)
Unfortunately, after install the system is left with a startpar error on logout (wich prevents sgxi to successfully install the Nvidia drivers):
startpar: services(s) returned failure: live-installer failed
This was caused by residual symbolic links in the rc*.d directories wich you can remove by the following code:
- Code: Select all
update-rc.d -f live-installer remove
Add this line in the remove live-initramfs part of installer.py:
- Code: Select all
# remove live-initramfs (or w/e)
print " --> Removing live-initramfs"
our_current += 1
self.update_progress(total=our_total, current=our_current, message=_("Removing live configuration (packages)"))
self.do_run_in_chroot("apt-get remove --purge --yes --force-yes live-boot live-boot-initramfs-tools live-initramfs live-installer live-config live-config-sysvinit")
# Original leaves symbolic links pointing to the live-installer script in /etc/init.d resulting in a startpar error
self.do_run_in_chroot("update-rc.d -f live-installer remove")
2. Minor mintconstructor improvent
When launching the chroot terminal, I encountered several mount related issues.
Only /proc is mounted but not /dev and /dev/pts.
file: mintConstructor.py
Mounting
- Code: Select all
# launch chroot terminal
def launchTerminal(self):
try:
# setup environment
# copy dns info
print _("Copying DNS info...")
os.popen('cp -f /etc/resolv.conf ' + os.path.join(self.customDir, "root/etc/resolv.conf"))
# mount /proc /dev /dev/pts
print _("Mounting /proc /dev /dev/pts filesystems...")
os.popen('mount --bind /proc \"' + os.path.join(self.customDir, "root/proc") + '\"')
os.popen('mount --bind /dev \"' + os.path.join(self.customDir, "root/dev") + '\"')
os.popen('mount --bind /dev/pts \"' + os.path.join(self.customDir, "root/dev/pts") + '\"')
Unmounting
- Code: Select all
# umount /proc /dev /dev/pts
print _("Umounting /proc /dev /dev/pts ...")
os.popen('umount \"' + os.path.join(self.customDir, "root/proc/") + '\"')
os.popen('umount \"' + os.path.join(self.customDir, "root/dev/") + '\"')
os.popen('umount \"' + os.path.join(self.customDir, "root/dev/pts/") + '\"')






