xpra icon
Bug tracker and wiki

Ticket #2341: server-start-debug.patch

File server-start-debug.patch, 29.4 KB (added by Antoine Martin, 8 months ago)

ugly debug logging patch

  • xpra/scripts/server.py

     
    915915        if uinput_uuid:
    916916            save_uinput_id(uinput_uuid)
    917917
     918    log.warn("make server")
    918919    if shadowing:
    919920        app = make_shadow_server()
    920921    elif proxying:
     
    930931    try:
    931932        app.exec_cwd = opts.chdir or cwd
    932933        app.display_name = display_name
     934        log.warn("init(opts)")
    933935        app.init(opts)
     936        log.warn("init_sockets(opts)")
    934937        app.init_sockets(sockets)
     938        log.warn("init_dbus")
    935939        app.init_dbus(dbus_pid, dbus_env)
    936940        if not shadowing and (xvfb_pid or clobber):
    937941            app.init_display_pid(xvfb_pid)
     
    939943        del opts
    940944        if not app.server_ready():
    941945            return 1
     946        log.warn("server_init")
    942947        app.server_init()
     948        log.warn("setup()")
    943949        app.setup()
     950        log.warn("init_when_ready()")
    944951        app.init_when_ready(_when_ready)
    945952    except InitException as e:
    946953        log.error("xpra server initialization error:")
     
    954961        app.cleanup()
    955962        return 1
    956963
     964    log.warn("run()")
    957965    try:
    958966        log("running %s", app.run)
    959967        r = app.run()
  • xpra/server/gtk_server_base.py

     
    66# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
    77# later version. See the file COPYING for details.
    88
     9from xpra.log import Logger
     10
     11log = Logger("x11", "server")
     12log.error("GTK Server Base import 0")
     13
    914import sys
    1015import os.path
    1116
     17log.error("GTK Server Base import 1")
    1218from xpra.util import flatten_dict, envbool
    1319from xpra.os_util import monotonic_time
    1420from xpra.gtk_common.gobject_compat import (
     
    1521    import_gdk, import_glib, is_gtk3,
    1622    register_os_signals,
    1723    )
     24log.error("GTK Server Base import 2")
    1825from xpra.gtk_common.quit import (
    1926    gtk_main_quit_really,
    2027    gtk_main_quit_on_fatal_exceptions_enable,
    2128    gtk_main_quit_on_fatal_exceptions_disable,
    2229    )
     30log.error("GTK Server Base import 3")
    2331from xpra.server import server_features
     32log.error("GTK Server Base import 4")
    2433from xpra.server.server_base import ServerBase
     34log.error("GTK Server Base import 5")
    2535from xpra.gtk_common.gtk_util import (
    2636    get_gtk_version_info, gtk_main, display_get_default, get_root_size,
    2737    keymap_get_for_display, icon_theme_get_default, ICON_SIZE_BUTTON,
    2838    )
     39log.error("GTK Server Base import 6")
    2940from xpra.log import Logger
    3041
    3142log = Logger("server", "gtk")
     
    307318            buf.close()
    308319            return "png", w, h, cpixels
    309320        return ()
     321
     322log.error("GTK Server Base import 99")
  • xpra/server/mixins/encoding_server.py

     
    9999             }
    100100
    101101    def init_encodings(self):
     102        log.warn("init_encodings() 0")
    102103        load_codecs(decoders=False, video=False)
     104        log.warn("init_encodings() 1")
    103105        encs, core_encs = [], []
    104106        log("init_encodings() allowed_encodings=%s", self.allowed_encodings)
    105107        def add_encodings(encodings):
     
    120122        ve = getVideoHelper().get_encodings()
    121123        log("init_encodings() adding video encodings: %s", ve)
    122124        add_encodings(ve)  #ie: ["vp8", "h264"]
     125        log.warn("init_encodings() 4")
    123126        #Pithon Imaging Libary:
    124127        enc_pillow = get_codec("enc_pillow")
    125128        if enc_pillow:
     
    159162            self.default_encoding = self.encoding
    160163        else:
    161164            log.warn("ignored invalid default encoding option: %s", self.encoding)
     165        log.warn("init_encodings() 9")
    162166
    163167
    164168    def _process_encoding(self, proto, packet):
  • xpra/server/server_base.py

     
    66# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
    77# later version. See the file COPYING for details.
    88
     9from xpra.log import Logger
     10
     11log = Logger("server")
     12log.error("Server Base import 0")
     13
    914import os
    1015from threading import Thread
    1116
     17log.error("Server Base import 1")
    1218from xpra.server.server_core import ServerCore, get_thread_info
     19log.error("Server Base import 2")
    1320from xpra.server.mixins.server_base_controlcommands import ServerBaseControlCommands
     21log.error("Server Base import 3")
    1422from xpra.os_util import monotonic_time, bytestostr, strtobytes, WIN32, PYTHON3
     23log.error("Server Base import 4")
    1524from xpra.util import (
    1625    typedict, flatten_dict, updict, merge_dicts, envbool, envint,
    1726    SERVER_EXIT, SERVER_ERROR, SERVER_SHUTDOWN, DETACH_REQUEST,
    1827    NEW_CLIENT, DONE, SESSION_BUSY,
    1928    )
     29log.error("Server Base import 5")
    2030from xpra.net.bytestreams import set_socket_timeout
     31log.error("Server Base import 6")
    2132from xpra.server import server_features
     33log.error("Server Base import 7")
    2234from xpra.server import EXITING_CODE
     35log.error("Server Base import 8")
    2336from xpra.log import Logger
    2437
     38log.error("Server Base import 9")
    2539SERVER_BASES = [ServerCore, ServerBaseControlCommands]
    2640if server_features.notifications:
    2741    from xpra.server.mixins.notification_forwarder import NotificationForwarder
     
    6781    SERVER_BASES.append(WindowServer)
    6882SERVER_BASES = tuple(SERVER_BASES)
    6983ServerBaseClass = type('ServerBaseClass', SERVER_BASES, {})
     84log.error("Server Base import 10")
    7085
    7186log = Logger("server")
    7287netlog = Logger("network")
     
    140155            start = monotonic_time()
    141156            c.init(self, opts)
    142157            end = monotonic_time()
    143             log("%3ims in %s.init", 1000*(end-start), c)
     158            log.warn("%3ims in %s.init", 1000*(end-start), c)
    144159        self.sharing = opts.sharing
    145160        self.lock = opts.lock
    146161        self.idle_timeout = opts.idle_timeout
     
    153168            start = monotonic_time()
    154169            c.setup(self)
    155170            end = monotonic_time()
    156             log("%3ims in %s.setup", 1000*(end-start), c)
     171            log.warn("%3ims in %s.setup", 1000*(end-start), c)
    157172        self.init_thread = Thread(target=self.threaded_init)
    158173        self.init_thread.start()
    159174
  • xpra/server/server_core.py

     
    66# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
    77# later version. See the file COPYING for details.
    88
     9from xpra.log import Logger
     10
     11log = Logger("server")
     12log.error("Server Core import 0")
     13
    914import os
    1015import sys
    1116import errno
     
    1520import traceback
    1621from weakref import WeakKeyDictionary
    1722from time import sleep, time
     23log.error("Server Core import 1")
    1824
    1925from xpra.version_util import (
    2026    XPRA_VERSION, full_version_str, version_compat_check, get_version_info_full,
    2127    get_platform_info, get_host_info,
    2228    )
     29log.error("Server Core import 2")
    2330from xpra.scripts.server import deadly_signal
    2431from xpra.server.server_util import write_pidfile, rm_pidfile
    2532from xpra.scripts.config import InitException, parse_bool, python_platform, parse_with_unit, FALSE_OPTIONS, TRUE_OPTIONS
     33log.error("Server Core import 3")
    2634from xpra.net.bytestreams import (
    2735    SocketConnection, SSLSocketConnection,
    2836    log_new_connection, pretty_socket, SOCKET_TIMEOUT,
    2937    )
     38log.error("Server Core import 3a")
    3039from xpra.net.net_util import get_network_caps, get_info as get_net_info
     40log.error("Server Core import 3b")
    3141from xpra.net.protocol import Protocol, sanity_checks
     42log.error("Server Core import 4")
    3243from xpra.net.digest import get_salt, gendigest, choose_digest
    3344from xpra.platform import set_name
    3445from xpra.platform.paths import get_app_dir
     46log.error("Server Core import 5")
    3547from xpra.os_util import (
    3648    filedata_nocrlf, get_machine_id, get_user_uuid, platform_name, get_ssh_port,
    3749    strtobytes, bytestostr, get_hex_uuid,
     
    3850    getuid, monotonic_time, get_peercred, hexstr,
    3951    WIN32, POSIX, PYTHON3, BITS,
    4052    )
     53log.error("Server Core import 6")
    4154from xpra.server.background_worker import stop_worker, get_worker
    4255from xpra.make_thread import start_thread
     56log.error("Server Core import 7")
    4357from xpra.util import (
    4458    csv, merge_dicts, typedict, notypedict, flatten_dict, parse_simple_dict,
    4559    repr_ellipsized, dump_all_frames, nonl, envint, envbool, envfloat,
     
    8498</body>
    8599"""
    86100
     101log.error("Server Core import 8")
     102
    87103def pack_one_packet(packet):
    88104    try:
    89105        from xpra.net.packet_encoding import get_enabled_encoders, get_encoder
     
    329345        return True
    330346
    331347    def server_init(self):
     348        log.warn("server core server_init() 0")
    332349        self.mdns_publish()
     350        log.warn("server core server_init() 1")
    333351        self.start_listen_sockets()
     352        log.warn("server core server_init() 2")
    334353
    335354    def setup(self):
    336355        self.init_packet_handlers()
     
    392411
    393412
    394413    def run(self):
     414        log.warn("run() start")
    395415        self.print_run_info()
    396416        self.print_screen_info()
    397417        self.install_signal_handlers(self.signal_quit)
     
    404424                    log.error("Error on server start ready callback '%s':", x)
    405425                    log.error(" %s", e)
    406426                    del e
     427            log.warn("run() start_ready_callbacks")
     428        log.warn("run() 5")
    407429        self.idle_add(start_ready_callbacks)
    408430        self.idle_add(self.reset_server_timeout)
    409431        self.idle_add(self.server_is_ready)
    410432        self.do_run()
     433        log.warn("run() 9")
    411434        log("run()")
    412435        return 0
    413436
     
    21382161            if conn:
    21392162                conn.remote = bfrom
    21402163        protocol.process_udp_data(uuid, seqno, synchronous, chunk, chunks, data, bfrom)
     2164
     2165log.error("Server Core import 99")
  • xpra/x11/gtk_x11/wm.py

     
    190190        }
    191191
    192192    def __init__(self, replace_other_wm, wm_name, display=None):
     193        log.warn("WM() 0")
    193194        gobject.GObject.__init__(self)
    194195
     196        log.warn("WM() 1")
    195197        if display is None:
    196198            display = display_get_default()
    197199        self._display = display
    198         self._root = self._display.get_default_screen().get_root_window()
     200        self._root = display.get_default_screen().get_root_window()
    199201        self._wm_name = wm_name
    200202        self._ewmh_window = None
    201203
     
    204206        # youngest...
    205207        self._windows_in_order = []
    206208
     209        log.warn("WM() 2")
    207210        # Become the Official Window Manager of this year's display:
    208211        self._wm_selection = ManagerSelection("WM_S0")
    209212        self._cm_wm_selection = ManagerSelection("_NET_WM_CM_S0")
     
    217220        self._wm_selection.acquire(mode)
    218221        self._cm_wm_selection.acquire(mode)
    219222
     223        log.warn("WM() 3")
    220224        # Set up the necessary EWMH properties on the root window.
    221225        self._setup_ewmh_window()
    222226        # Start with just one desktop:
     
    223227        self.set_desktop_list((u"Main", ))
    224228        self.set_current_desktop(0)
    225229        # Start with the full display as workarea:
     230        log.warn("WM() 4")
    226231        root_w, root_h = get_default_root_window().get_geometry()[2:4]
    227232        self.root_set("_NET_SUPPORTED", ["atom"], NET_SUPPORTED)
    228233        self.set_workarea(0, 0, root_w, root_h)
     
    231236
    232237        self.size_constraints = DEFAULT_SIZE_CONSTRAINTS
    233238
     239        log.warn("WM() 5")
    234240        # Load up our full-screen widget
    235241        self._world_window = None
    236242        if not is_gtk3():
     
    248254        add_fallback_receiver("child-map-request-event", self)
    249255        rxid = get_xwindow(self._root)
    250256        X11Window.substructureRedirect(rxid)
     257        log.warn("WM() 6")
    251258
    252259        for w in get_children(self._root):
    253260            # Checking for FOREIGN here filters out anything that we've
     
    259266                and X11Window.is_mapped(xid)):
    260267                log("Wm managing pre-existing child window %#x", xid)
    261268                self._manage_client(w)
     269        log.warn("WM() 7")
    262270
    263271        # Also watch for focus change events on the root window
    264272        X11Window.selectFocusChange(rxid)
    265273        X11Keyboard.selectBellNotification(True)
     274        log.warn("WM() 8")
    266275
    267276        # FIXME:
    268277        # Need viewport abstraction for _NET_CURRENT_DESKTOP...
  • xpra/x11/server.py

     
    66# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
    77# later version. See the file COPYING for details.
    88
     9from xpra.log import Logger
     10
     11log = Logger("server")
     12log.error("X11 server import 0")
     13
    914import os
    1015import signal
    1116import math
    1217from collections import deque, namedtuple
    1318
     19log.error("X11 server import 1")
     20
    1421from xpra.version_util import XPRA_VERSION
    1522from xpra.util import updict, rindex, envbool, envint
    1623from xpra.os_util import memoryview_to_bytes, strtobytes, bytestostr, monotonic_time
    1724from xpra.server import server_features
    1825from xpra.gtk_common.gobject_util import one_arg_signal
     26log.error("X11 server import 2")
    1927from xpra.gtk_common.gtk_util import (
    2028    get_default_root_window, get_xwindow, pixbuf_new_from_data, is_realized,
    2129    SUBSTRUCTURE_MASK, GDKWINDOW_TEMP,
    2230    )
    2331from xpra.x11.common import Unmanageable, MAX_WINDOW_SIZE
     32log.error("X11 server import 3")
    2433from xpra.x11.gtk_x11.prop import prop_set
    2534from xpra.x11.gtk_x11.tray import get_tray_window, SystemTray
    2635from xpra.x11.gtk_x11.gdk_bindings import (
     
    2736   add_event_receiver,
    2837   get_children,
    2938   )
     39log.error("X11 server import 4")
    3040from xpra.x11.bindings.window_bindings import X11WindowBindings #@UnresolvedImport
     41log.error("X11 server import 4a")
    3142from xpra.x11.bindings.keyboard_bindings import X11KeyboardBindings #@UnresolvedImport
     43log.error("X11 server import 4b")
    3244from xpra.x11.x11_server_base import X11ServerBase
     45log.error("X11 server import 5")
    3346from xpra.gtk_common.error import xsync, xswallow, xlog
    3447from xpra.gtk_common.gobject_compat import import_gtk, import_gdk, import_glib, import_gobject, is_gtk3
    3548from xpra.log import Logger
    3649
     50log.error("X11 server import 6")
     51
    3752log = Logger("server")
    3853focuslog = Logger("server", "focus")
    3954grablog = Logger("server", "grab")
     
    195210        }
    196211
    197212    def __init__(self, clobber):
     213        log.warn("X11 Server __init__ 0")
    198214        self.root_overlay = None
    199215        self.repaint_root_overlay_timer = None
    200216        self.configure_damage_timers = {}
     
    204220        self._wm = None
    205221        self.last_raised = None
    206222        self.system_tray = False
     223        log.warn("X11 Server __init__ 1")
    207224        gobject.GObject.__init__(self)
     225        log.warn("X11 Server __init__ 2")
    208226        X11ServerBase.__init__(self, clobber)
    209227        self.session_type = "seamless"
     228        log.warn("X11 Server __init__ 3")
    210229
    211230    def init(self, opts):
     231        log.warn("x11 server init() 0")
    212232        self.wm_name = opts.wm_name
    213233        self.sync_xvfb = int(opts.sync_xvfb)
    214234        self.system_tray = opts.system_tray
     235        log.warn("x11 server init() 1")
    215236        X11ServerBase.init(self, opts)
     237        log.warn("x11 server init() 2")
    216238        self.fake_xinerama = opts.fake_xinerama
    217239        def log_server_event(_, event):
    218240            eventlog("server-event: %s", event)
    219241        self.connect("server-event", log_server_event)
     242        log.warn("x11 server init() 3")
    220243
    221244    def server_init(self):
     245        log.warn("server_init()")
    222246        X11ServerBase.server_init(self)
     247        log.warn("server_init() 1")
    223248        if not self.clobber and self.randr:
    224249            from xpra.x11.vfb_util import set_initial_resolution, DEFAULT_VFB_RESOLUTION
     250            log.warn("server_init() 2")
    225251            with xlog:
    226252                set_initial_resolution(DEFAULT_VFB_RESOLUTION)
     253            log.warn("server_init() 3")
    227254
    228255    def server_ready(self):
    229256        if not X11Window.displayHasXComposite():
     
    242269            self.add_system_tray()
    243270
    244271    def x11_init(self):
     272        log.warn("server x11_init() 0")
    245273        X11ServerBase.x11_init(self)
    246274
     275        log.warn("server x11_init() 1")
    247276        self._focus_history = deque(maxlen=100)
    248277        # Do this before creating the Wm object, to avoid clobbering its
    249278        # selecting SubstructureRedirect.
     
    271300                        X11Window.XCompositeReleaseOverlayWindow(self.root_overlay)
    272301                    self.root_overlay = None
    273302
     303        log.warn("server x11_init() 2")
    274304        ### Create the WM object
    275305        from xpra.x11.gtk_x11.wm import Wm
     306        log.warn("server x11_init() 3")
    276307        self._wm = Wm(self.clobber, self.wm_name)
     308        log.warn("server x11_init() 4")
    277309        if server_features.windows:
    278310            self._wm.connect("new-window", self._new_window_signaled)
    279311        self._wm.connect("quit", lambda _: self.clean_quit(True))
    280312        self._wm.connect("show-desktop", self._show_desktop)
     313        log.warn("server x11_init() 8")
    281314
    282315        #for handling resize synchronization between client and server (this is not xsync!):
    283316        self.last_client_configure_event = 0
    284317        self.snc_timer = 0
     318        log.warn("server x11_init() 9")
    285319
    286320    def do_cleanup(self):
    287321        if self._tray:
     
    13451379
    13461380
    13471381gobject.type_register(XpraServer)
     1382log.error("X11 server import 9")
  • xpra/x11/x11_server_base.py

     
    55# Copyright (C) 2008 Nathaniel Smith <njs@pobox.com>
    66# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
    77# later version. See the file COPYING for details.
     8from xpra.log import Logger
    89
     10log = Logger("x11", "server")
     11log.error("X11 Server Base import 0")
    912import os
    1013
     14log.error("X11 Server Base import 1")
    1115from xpra.os_util import bytestostr, strtobytes, hexstr
    1216from xpra.util import nonl, typedict, envbool, iround
    1317from xpra.gtk_common.error import xswallow, xsync, xlog
     18log.error("X11 Server Base import 2")
    1419from xpra.x11.x11_server_core import X11ServerCore, XTestPointerDevice
     20log.error("X11 Server Base import 3")
    1521from xpra.x11.bindings.keyboard_bindings import X11KeyboardBindings #@UnresolvedImport
     22log.error("X11 Server Base import 4")
    1623from xpra.log import Logger
    1724
    1825log = Logger("x11", "server")
     
    6269        self.display_pid = 0
    6370
    6471    def do_init(self, opts):
     72        log.warn("x11 server base do_init() 0")
    6573        X11ServerCore.do_init(self, opts)
     74        log.warn("x11 server base do_init() 1")
    6675        self._xsettings_enabled = opts.xsettings
    6776        if self._xsettings_enabled:
     77            log.warn("x11 server base do_init() 2")
    6878            from xpra.x11.xsettings import XSettingsHelper
    6979            self._default_xsettings = XSettingsHelper().get_settings()
    7080            log("_default_xsettings=%s", self._default_xsettings)
     81            log.warn("x11 server base do_init() 3")
    7182            self.init_all_server_settings()
     83            log.warn("x11 server base do_init() 4")
    7284
    7385
    7486    def init_display_pid(self, pid):
     
    230242        self.set_xsettings(self._default_xsettings or (0, ()))
    231243
    232244    def set_xsettings(self, v):
     245        log.warn("set_xsettings() 0")
    233246        if not self._xsettings_enabled:
    234247            return
    235248        log("set_xsettings(%s)", v)
     249        log.warn("set_xsettings() 1")
    236250        with xsync:
    237251            if self._xsettings_manager is None:
     252                log.warn("set_xsettings() 2")
    238253                from xpra.x11.xsettings import XSettingsManager
     254                log.warn("set_xsettings() 2a")
    239255                self._xsettings_manager = XSettingsManager()
     256                log.warn("set_xsettings() 3")
    240257            self._xsettings_manager.set_settings(v)
     258            log.warn("set_xsettings() 4")
    241259
    242260    def init_all_server_settings(self):
    243261        log("init_all_server_settings() dpi=%i, default_dpi=%i", self.dpi, self.default_dpi)
    244262        #almost like update_all, except we use the default_dpi,
    245263        #since this is called before the first client connects
     264        log.error("init_all_server_settings 0")
    246265        self.do_update_server_settings({
    247266            b"resource-manager"  : b"",
    248267            b"xsettings-blob"    : (0, [])
    249268            }, reset = True, dpi = self.default_dpi, cursor_size=24)
     269        log.error("init_all_server_settings 1")
    250270
    251271    def update_all_server_settings(self, reset=False):
    252272        self.update_server_settings({
     
    263283        if not self._xsettings_enabled:
    264284            log("ignoring xsettings update: %s", settings)
    265285            return
     286        log.error("do_update_server_settings 0")
    266287        if reset:
    267288            #FIXME: preserve serial? (what happens when we change values which had the same serial?)
    268289            self.reset_settings()
     290            log.error("do_update_server_settings 1")
    269291            self._settings = {}
    270292            if self._default_xsettings:
     293                log.error("do_update_server_settings 2")
    271294                #try to parse default xsettings into a dict:
    272295                try:
    273296                    for _, prop_name, value, _ in self._default_xsettings[1]:
     
    276299                    log("failed to parse %s", self._default_xsettings)
    277300                    log.warn("Warning: failed to parse default XSettings:")
    278301                    log.warn(" %s", e)
     302            log.error("do_update_server_settings 3")
    279303        old_settings = dict(self._settings)
     304        log.error("do_update_server_settings 4")
    280305        log("server_settings: old=%s, updating with=%s", nonl(old_settings), nonl(settings))
    281306        log("overrides: dpi=%s, double click time=%s, double click distance=%s",
    282307            dpi, double_click_time, double_click_distance)
    283308        log("overrides: antialias=%s", antialias)
    284309        self._settings.update(settings)
     310        log.error("do_update_server_settings 5")
    285311        for k, v in settings.items():
    286312            #cook the "resource-manager" value to add the DPI and/or antialias values:
    287313            if k==b"resource-manager" and (dpi>0 or antialias or cursor_size>0):
     
    377403                    root_set("RESOURCE_MANAGER")
    378404                else:
    379405                    log.warn("Warning: unexpected setting '%s'", bytestostr(k))
     406        log.error("do_update_server_settings 9")
     407
     408log.error("X11 Server Base import 9")
  • xpra/x11/x11_server_core.py

     
    66# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
    77# later version. See the file COPYING for details.
    88
     9from xpra.log import Logger
     10log = Logger("x11", "server")
     11log.error("X11 Server Core import 0")
     12
    913import os
    1014import threading
    1115
     16log.error("X11 Server Core import 1")
    1217from xpra.gtk_common.gobject_compat import import_gdk
     18log.error("X11 Server Core import 2")
    1319from xpra.x11.bindings.core_bindings import set_context_check, X11CoreBindings     #@UnresolvedImport
     20log.error("X11 Server Core import 3")
    1421from xpra.x11.bindings.randr_bindings import RandRBindings  #@UnresolvedImport
     22log.error("X11 Server Core import 4")
    1523from xpra.x11.bindings.keyboard_bindings import X11KeyboardBindings #@UnresolvedImport
     24log.error("X11 Server Core import 5")
    1625from xpra.x11.bindings.window_bindings import X11WindowBindings #@UnresolvedImport
     26log.error("X11 Server Core import 6")
    1727from xpra.gtk_common.error import XError, xswallow, xsync, xlog, trap, verify_sync
     28log.error("X11 Server Core import 7")
    1829from xpra.gtk_common.gtk_util import get_xwindow, display_get_default, get_default_root_window
     30log.error("X11 Server Core import 8")
    1931from xpra.server.server_uuid import save_uuid, get_uuid
     32log.error("X11 Server Core import 9")
    2033from xpra.x11.fakeXinerama import find_libfakeXinerama, save_fakeXinerama_config, cleanup_fakeXinerama
     34log.error("X11 Server Core import 10")
    2135from xpra.x11.gtk_x11.prop import prop_get, prop_set
     36log.error("X11 Server Core import 11")
    2237from xpra.x11.gtk_x11.gdk_display_source import close_gdk_display_source
     38log.error("X11 Server Core import 12")
    2339from xpra.x11.gtk_x11.gdk_bindings import init_x11_filter, cleanup_x11_filter, cleanup_all_event_receivers
     40log.error("X11 Server Core import 13")
    2441from xpra.x11.common import MAX_WINDOW_SIZE
     42log.error("X11 Server Core import 14")
    2543from xpra.os_util import monotonic_time, strtobytes, bytestostr, PYTHON3
     44log.error("X11 Server Core import 15")
    2645from xpra.util import engs, csv, typedict, iround, envbool, XPRA_DPI_NOTIFICATION_ID
     46log.error("X11 Server Core import 16")
    2747from xpra.net.compression import Compressed
     48log.error("X11 Server Core import 17")
    2849from xpra.server.gtk_server_base import GTKServerBase
     50log.error("X11 Server Core import 18")
    2951from xpra.x11.xkbhelper import clean_keyboard_state
     52log.error("X11 Server Core import 19")
    3053from xpra.scripts.config import FALSE_OPTIONS
    3154from xpra.log import Logger
     55log.error("X11 Server Core import 20")
    3256
    3357gdk = import_gdk()
    3458
     
    97121        log("XShape=%s", X11Window.displayHasXShape())
    98122
    99123    def init(self, opts):
     124        log.warn("x11 server core init(opts) 0")
    100125        self.do_init(opts)
     126        log.warn("x11 server core init(opts) 1")
    101127        GTKServerBase.init(self, opts)
     128        log.warn("x11 server core init(opts) 2")
    102129
    103130    def server_init(self):
     131        log.warn("x11 server_init() 0")
    104132        with xsync:
    105133            self.x11_init()
     134        log.warn("x11 server_init() 1")
    106135        from xpra.server import server_features
    107136        if server_features.windows:
    108137            from xpra.x11.x11_window_filters import init_x11_window_filters
    109138            init_x11_window_filters()
     139        log.warn("x11 server_init() 2")
    110140        super(X11ServerCore, self).server_init()
     141        log.warn("x11 server_init() 3")
    111142
    112143    def do_init(self, opts):
    113144        self.opengl = opts.opengl
     
    120151
    121152
    122153    def x11_init(self):
     154        log.warn("x11_init() 0")
    123155        clean_keyboard_state()
     156        log.warn("x11_init() 1")
    124157        if self.fake_xinerama in FALSE_OPTIONS:
    125158            self.libfakeXinerama_so = None
    126159        elif os.path.isabs(self.fake_xinerama):
     
    127160            self.libfakeXinerama_so = self.fake_xinerama
    128161        else:
    129162            self.libfakeXinerama_so = find_libfakeXinerama()
     163        log.warn("x11_init() 2")
    130164        if not X11Keyboard.hasXFixes() and self.cursors:
    131165            log.error("Error: cursor forwarding support disabled")
    132166        if not X11Keyboard.hasXTest():
     
    133167            log.error("Error: keyboard and mouse disabled")
    134168        elif not X11Keyboard.hasXkb():
    135169            log.error("Error: limited keyboard support")
     170        log.warn("x11_init() 3")
    136171        self.init_x11_atoms()
     172        log.warn("x11_init() 3a")
    137173        if self.randr:
    138174            self.init_randr()
     175        log.warn("x11_init() 4")
    139176        self.init_cursor()
     177        log.warn("x11_init() 5")
    140178        self.query_opengl()
     179        log.warn("x11_init() 6")
    141180        self.x11_filter = init_x11_filter()
     181        log.warn("x11_init() 8")
    142182        assert self.x11_filter
    143183
    144184
     
    10451085        packet = ["screenshot", width, height, "png", width*4, Compressed("png", data)]
    10461086        log("screenshot: %sx%s %s", packet[1], packet[2], packet[-1])
    10471087        return packet
     1088
     1089log.error("X11 Server Core import 99")
  • xpra/x11/xsettings.py

     
    1818from xpra.gtk_common.gobject_compat import import_gtk, import_gobject
    1919from xpra.log import Logger
    2020
     21log = Logger("x11", "xsettings")
     22log.warn("xsettings import 0")
     23
    2124X11Window = X11WindowBindings()
    2225gtk = import_gtk()
    2326gobject = import_gobject()
    2427
    25 log = Logger("x11", "xsettings")
    2628
     29log.warn("xsettings import 1")
    2730#the X11 atom name for the XSETTINGS property:
    2831XSETTINGS = "_XSETTINGS_SETTINGS"
    2932#constant type in prop.py:
     
    3134
    3235XNone = constants["XNone"]
    3336
     37log.warn("xsettings import 2")
    3438
    3539class XSettingsManager(object):
    3640    def __init__(self, screen_number=0):
     41        log.warn("XSettingsManager 0")
    3742        selection = "_XSETTINGS_S%i" % screen_number
    3843        self._manager = ManagerSelection(selection)
     44        log.warn("XSettingsManager 1")
    3945        # Technically I suppose ICCCM says we should use FORCE, but it's not
    4046        # like a window manager where you have to wait for the old wm to clean
    4147        # things up before you can do anything... as soon as the selection is
     
    4248        # gone, the settings are gone. (Also, if we're stealing from
    4349        # ourselves, we probably don't clean up the window properly.)
    4450        self._manager.acquire(self._manager.FORCE_AND_RETURN)
     51        log.warn("XSettingsManager 2")
    4552        self._window = self._manager.window()
     53        log.warn("XSettingsManager 3")
    4654
    4755    def set_settings(self, settings):
    4856        if isinstance(settings, list):
     
    122130            self.emit("xsettings-changed")
    123131
    124132gobject.type_register(XSettingsWatcher)
     133
     134log.warn("xsettings import 3")