else:
kernel = kernel.replace("linux-", "")
- command = "sudo {}/build.sh --arch {} --kernel {} --lang {} --comp-type {} --user {} --password {}".format(root_dir, arch, kernel, locale, comp, username, password)
+ display = os.environ["DISPLAY"]
+ xauthority = os.environ["XAUTHORITY"]
+
+ command = "pkexec env DISPLAY={} XAUTHORITY={} {}/build.sh --arch {} --kernel {} --lang {} --comp-type {} --user {} --password {}".format(display, xauthority, root_dir, arch, kernel, locale, comp, username, password)
if self.boot_splash_button_enable.get_active():
command = "{} --boot-splash".format(command)