启动 Gnome Tweak Tool 时出现“检测 shell 错误”

启动 Gnome Tweak Tool 时出现“检测 shell 错误”

在我开始安装 Gnome 之前,它一直运行正常。我在 Google 上搜索过,但什么也没找到。如果我登录 Gnome,屏幕会大幅放大,我必须在页面上平移。我希望适当的设置可以在调整工具中找到。

__
WARNING : Error detecting shell
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gtweak/tweaks/tweak_shell_extensions.py", line 149, in __init__
    shell = GnomeShellFactory().get_shell()
  File "/usr/lib/python2.7/dist-packages/gtweak/utils.py", line 38, in getinstance
    instances[cls] = cls()
  File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 143, in __init__
    proxy = _ShellProxy()
  File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 44, in __init__
    result, output = self.proxy.Eval('(s)', js)
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gio.py", line 148, in __call__
    kwargs.get('flags', 0), kwargs.get('timeout', -1), None)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell was not provided by any .service files
WARNING : Shell not running
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gtweak/tweaks/tweak_shell.py", line 59, in __init__
    self._shell = GnomeShellFactory().get_shell()
  File "/usr/lib/python2.7/dist-packages/gtweak/utils.py", line 38, in getinstance
    instances[cls] = cls()
  File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 143, in __init__
    proxy = _ShellProxy()
  File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 44, in __init__
    result, output = self.proxy.Eval('(s)', js)
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gio.py", line 148, in __call__
    kwargs.get('flags', 0), kwargs.get('timeout', -1), None)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell was not provided by any .service files
WARNING : Could not list shell extensions
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gtweak/tweaks/tweak_shell.py", line 64, in __init__
    extensions = self._shell.list_extensions()
AttributeError: ShellThemeTweak instance has no attribute '_shell'
Traceback (most recent call last):
  File "/usr/bin/gnome-tweak-tool", line 76, in <module>
    MainWindow()
  File "/usr/lib/python2.7/dist-packages/gtweak/mainwindow.py", line 44, in __init__
    model)
  File "/usr/lib/python2.7/dist-packages/gtweak/tweakview.py", line 40, in __init__
    self._model.load_tweaks()
  File "/usr/lib/python2.7/dist-packages/gtweak/tweakmodel.py", line 135, in load_tweaks
    mods = __import__("gtweak.tweaks", globals(), locals(), tweak_files, 0)
  File "/usr/lib/python2.7/dist-packages/gtweak/tweaks/tweak_shell.py", line 236, in <module>
    GSettingsSwitchTweak("org.gnome.settings-daemon.plugins.power", "lid-close-suspend-with-external-monitor"),
  File "/usr/lib/python2.7/dist-packages/gtweak/widgets.py", line 116, in __init__
    _GSettingsTweak.__init__(self, schema_name, key_name, **options)
  File "/usr/lib/python2.7/dist-packages/gtweak/widgets.py", line 105, in __init__
    options.get("summary",self.settings.schema_get_summary(key_name)),
  File "/usr/lib/python2.7/dist-packages/gtweak/gsettings.py", line 122, in schema_get_summary
    return self._schema._schema[key]["summary"]
KeyError: 'lid-close-suspend-with-external-monitor'

答案1

我在这里遇到了类似的问题,但错误略有不同:

Traceback (most recent call last):
File "/usr/bin/gnome-tweak-tool", line 76, in <module>
MainWindow()
File "/usr/lib/python2.7/dist-packages/gtweak/mainwindow.py", line 44, in __init__
model)
File "/usr/lib/python2.7/dist-packages/gtweak/tweakview.py", line 40, in __init__
self._model.load_tweaks()
 File "/usr/lib/python2.7/dist-packages/gtweak/tweakmodel.py", line 135, in load_tweaks
mods = __import__("gtweak.tweaks", globals(), locals(), tweak_files, 0)
File "/usr/lib/python2.7/dist-packages/gtweak/tweaks/tweak_shell.py", line 236, in <module>
  GSettingsSwitchTweak("org.gnome.settings-daemon.plugins.power", "lid-close-suspend-with-external-monitor"),
File "/usr/lib/python2.7/dist-packages/gtweak/widgets.py", line 116, in __init__
_GSettingsTweak.__init__(self, schema_name, key_name, **options)
File "/usr/lib/python2.7/dist-packages/gtweak/widgets.py", line 105, in __init__
options.get("summary",self.settings.schema_get_summary(key_name)),
File "/usr/lib/python2.7/dist-packages/gtweak/gsettings.py", line 122, in schema_get_summary
return self._schema._schema[key]["summary"]
 KeyError: 'lid-close-suspend-with-external-monitor'

我通过强制安装版本 3.3.4 解决了该问题。您可以使用 Synaptic 包管理器来完成此操作:

  1. 删除版本 3.4.0。

  2. 删除 rocoz PPA。

  3. 安装版本 3.3.4。

相关内容