Beispiel #1
0
 def __init__(self, setup, target_dir):
     self.setup = setup
     self.language = setup.language
     self.username = setup.username
     self.target_dir = target_dir
     self.locale = self.language.lower().split("_")
     self.scriptDir = os.path.dirname(os.path.realpath(__file__))
     self.edition = 'all'
     self.force = get_apt_force()
     config = get_config_dict(CONFIG_FILE)
     self.info = config.get('info', '/etc/linuxmint/info')
     if os.path.exists(self.info):
         config = get_config_dict(self.info)
         self.edition = config.get('EDITION', 'all').replace(' ', '').lower()
Beispiel #2
0
 def __init__(self, setup, target_dir):
     self.setup = setup
     self.language = setup.language
     self.username = setup.username
     self.target_dir = target_dir
     self.locale = self.language.lower().split("_")
     self.scriptDir = os.path.dirname(os.path.realpath(__file__))
     self.edition = 'all'
     self.force = get_apt_force()
     config = get_config_dict(CONFIG_FILE)
     self.info = config.get('info', '/etc/linuxmint/info')
     if os.path.exists(self.info):
         config = get_config_dict(self.info)
         self.edition = config.get('EDITION', 'all').replace(' ', '').lower()
Beispiel #3
0
    def __init__(self):
        self.scriptDir = dirname(realpath(__file__))
        # Load window and widgets
        self.builder = Gtk.Builder()
        self.builder.add_from_file(join(self.scriptDir, '../../share/debian-plymouth-manager/debian-plymouth-manager.glade'))

        # Main window objects
        go = self.builder.get_object
        self.window = go('dpmWindow')
        self.tv1 = go('tv1')
        self.tv2 = go('tv2')
        self.sw2 = go('sw2')
        self.statusbar = go('statusbar')
        self.btnPlymouth = go('btnPlymouth')
        self.btnThemes = go('btnThemes')
        self.btnGrub = go('btnGrub')
        self.pbDPM = go('pbDPM')
        self.btn1 = go('btn1')
        self.btn2 = go('btn2')
        self.lblTitle1 = go('lblTitle1')
        self.lblTitle2 = go('lblTitle2')

        # Translations
        title = _("Debian Plymouth Manager")
        self.window.set_title(title)
        self.btnPlymouth.set_label("_" + _("Plymouth"))
        self.btnThemes.set_label("_" + _("Themes"))
        self.btnGrub.set_label("_" + _("Grub"))

        self.selectedMenuItem = None
        self.selectedAvailableTheme = None
        self.selectedRemoveTheme = None
        self.threadPackage = None
        self.queue = Queue()
        self.noPlymouth = _('None: no plymouth splash')

        # Set some variables
        self.logFile = '/var/log/dpm.log'
        self.log = Logger(self.logFile, addLogTime=False, maxSizeKB=1024)
        self.version = utils.getPackageVersion('debian-plymouth-manager')
        self.plymouth = Plymouth(self.log)
        self.grub = Grub(self.log)
        self.resolutions = utils.getResolutions('800x600', '', True, False)
        self.currentResolution = self.plymouth.getCurrentResolution()
        self.selectedResolution = self.currentResolution
        self.currentGrubResolution = self.grub.getCurrentResolution()
        self.selectedGrubResolution = self.currentGrubResolution
        self.currentTheme = self.plymouth.getCurrentTheme()
        self.selectedTheme = self.currentTheme
        self.installedThemes = self.plymouth.getInstalledThemes()
        self.availableThemes = self.plymouth.getAvailableThemes()
        self.tv1Handler = TreeViewHandler(self.tv1, self.log)
        self.tv2Handler = TreeViewHandler(self.tv2, self.log)
        self.force = utils.get_apt_force()

        self.on_btnPlymouth_clicked()

        # Connect builder signals and show window
        self.builder.connect_signals(self)
        self.window.show_all()

        # TODO: Hide the tool bar for now
        go('tlbMain').set_visible(False)
Beispiel #4
0
from adjust_sources import Sources
from logger import Logger
from utils import getoutput,  get_apt_force,  get_package_version,  \
                             get_apt_cache_locked_program,  has_string_in_file,  \
                             get_debian_version,  can_copy

# Init logging
log_file = "/var/log/solydxk-system.log"
log = Logger(log_file, addLogTime=True, maxSizeKB=5120)
log.write('=====================================', 'adjust')
log.write(">>> Start SolydXK Adjustment <<<", 'adjust')
log.write('=====================================', 'adjust')


# --force-yes is deprecated in stretch
force = get_apt_force()
#force += " --assume-yes -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"


# Fix some programs [package, what to fix, options, exec from version (0 = all)]
fix_progs = [['apache2', '/var/log/apache2', 'root:adm', 0],
             ['mysql-client', '/var/log/mysql', 'mysql:adm', 0],
             ['clamav', '/var/log/clamav', 'clamav:clamav', 0],
             ['lightdm', '/var/lib/lightdm/data', 'lightdm:lightdm', 0],
             ['v86d', 'v86d', 'purge', 0],
             ['usb-creator', 'solydxk-usb-creator', 'purge', 0],
             ['solydk-system-adjustments-8', 'solydk-system-adjustments', 'purge', 0],
             ['solydx-system-adjustments-8', 'solydx-system-adjustments', 'purge', 0],
             ['solydk-system-adjustments-9', 'solydk-system-adjustments', 'purge', 0],
             ['solydx-system-adjustments-9', 'solydx-system-adjustments', 'purge', 0],
             ['firefox-solydxk-adjustments', 'firefox-esr-solydxk-adjustments', 'purge', 0]]
Beispiel #5
0
    def __init__(self):
        self.scriptDir = dirname(realpath(__file__))
        # Load window and widgets
        self.builder = Gtk.Builder()
        self.builder.add_from_file(
            join(
                self.scriptDir,
                '../../share/debian-plymouth-manager/debian-plymouth-manager.glade'
            ))

        # Main window objects
        go = self.builder.get_object
        self.window = go('dpmWindow')
        self.tv1 = go('tv1')
        self.tv2 = go('tv2')
        self.sw2 = go('sw2')
        self.statusbar = go('statusbar')
        self.btnPlymouth = go('btnPlymouth')
        self.btnThemes = go('btnThemes')
        self.btnGrub = go('btnGrub')
        self.pbDPM = go('pbDPM')
        self.btn1 = go('btn1')
        self.btn2 = go('btn2')
        self.lblTitle1 = go('lblTitle1')
        self.lblTitle2 = go('lblTitle2')

        # Translations
        title = _("Debian Plymouth Manager")
        self.window.set_title(title)
        self.btnPlymouth.set_label("_" + _("Plymouth"))
        self.btnThemes.set_label("_" + _("Themes"))
        self.btnGrub.set_label("_" + _("Grub"))

        self.selectedMenuItem = None
        self.selectedAvailableTheme = None
        self.selectedRemoveTheme = None
        self.threadPackage = None
        self.queue = Queue()
        self.noPlymouth = _('None: no plymouth splash')

        # Set some variables
        self.logFile = '/var/log/dpm.log'
        self.log = Logger(self.logFile, addLogTime=False, maxSizeKB=1024)
        self.version = utils.getPackageVersion('debian-plymouth-manager')
        self.plymouth = Plymouth(self.log)
        self.grub = Grub(self.log)
        self.resolutions = utils.getResolutions('800x600', '', True, False)
        self.currentResolution = self.plymouth.getCurrentResolution()
        self.selectedResolution = self.currentResolution
        self.currentGrubResolution = self.grub.getCurrentResolution()
        self.selectedGrubResolution = self.currentGrubResolution
        self.currentTheme = self.plymouth.getCurrentTheme()
        self.selectedTheme = self.currentTheme
        self.installedThemes = self.plymouth.getInstalledThemes()
        self.availableThemes = self.plymouth.getAvailableThemes()
        self.tv1Handler = TreeViewHandler(self.tv1, self.log)
        self.tv2Handler = TreeViewHandler(self.tv2, self.log)
        self.force = utils.get_apt_force()

        self.on_btnPlymouth_clicked()

        # Connect builder signals and show window
        self.builder.connect_signals(self)
        self.window.show_all()

        # TODO: Hide the tool bar for now
        go('tlbMain').set_visible(False)