This file is indexed.

/usr/share/pyshared/quodlibet/qltk/session.py is in exfalso 3.0.2-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 2013 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation

try:
    import dbus
    dbus
except ImportError:
    dbus = None

from quodlibet import app


def init(app_id):
    if not dbus:
        return

    try:
        bus = dbus.Bus(dbus.Bus.TYPE_SESSION)
        manager = bus.get_object("org.gnome.SessionManager",
                                 "/org/gnome/SessionManager")
        iface = dbus.Interface(manager, "org.gnome.SessionManager")
        client_path = iface.RegisterClient(app_id, "")

        client = bus.get_object("org.gnome.SessionManager", client_path)
        client_priv = dbus.Interface(client,
                                     "org.gnome.SessionManager.ClientPrivate")

        def end_session_cb(*args):
            print_d("GSM sent EndSession: going down")
            client_priv.EndSessionResponse(True, "")
            app.quit()

        def query_end_session_cb(*args):
            print_d("GSM sent QueryEndSession")
            client_priv.EndSessionResponse(True, "")

        client_priv.connect_to_signal("QueryEndSession", query_end_session_cb)
        client_priv.connect_to_signal("EndSession", end_session_cb)
    except dbus.DBusException:
        print_d("Connecting with the gnome session manager failed")
    else:
        print_d("Connected with gnome session manager: %s" % client_path)