我无法在Scratch中打开新标签或新文件。单击+图标没有任何反应,关闭所有文档并选择“新建文件”时,下图也没有发生。选择一个新文件会在终端上显示以下内容:

[_LOG_LEVEL_INFO 09:56:27.534393] Application.vala:157: Kernel version: 3.19.0-25-generic
[_LOG_LEVEL_DEBUG 09:56:27.535770] Settings.vala:158: Loading settings from schema 'org.pantheon.scratch.saved-state'
[_LOG_LEVEL_FATAL 09:56:27.612347] [Gtk] gtk_header_bar_pack: assertion 'gtk_widget_get_parent (widget) == NULL' failed
[_LOG_LEVEL_FATAL 09:56:27.612392] Scratch will not function properly.
[_LOG_LEVEL_FATAL 09:56:27.706954] file /build/scratch-text-editor-JxlBhk/scratch-text-editor-2.2.0~r1522/src/MainWindow‌​.vala: line 421: uncaught error: Arquivo ou diretório não encontrado (g-io-error-quark, 1)
[_LOG_LEVEL_FATAL 09:56:27.707004] Scratch will not function properly.
[_LOG_LEVEL_FATAL 09:56:27.707044] [Gtk] gtk_action_set_visible: assertion 'GTK_IS_ACTION (action)' failed
[_LOG_LEVEL_FATAL 09:56:27.707070] Scratch will not function properly. 
[_LOG_LEVEL_FATAL 09:56:27.707235] file /build/scratch-text-editor- JxlBhk/scratch-text-editor-2.2.0~r1522/src/MainWindow‌​.vala: line 421: uncaught error: Arquivo ou diretório não encontrado (g-io-error-quark, 1)
[_LOG_LEVEL_FATAL 09:56:27.707270] Scratch will not function properly.
[_LOG_LEVEL_DEBUG 09:56:27.709947] SplitView.vala:180: WelcomeScreen shown succefully
[_LOG_LEVEL_DEBUG 09:56:27.713487] Settings.vala:158: Loading settings from schema 'org.pantheon.scratch.plugins.folder-manager'
[_LOG_LEVEL_DEBUG 09:56:27.713872] MainWindow.vala:472: create 'unsaved' directory: /home/bpantoja/.local/share/scratch-text-editor/unsaved
[_LOG_LEVEL_FATAL 09:56:27.713949] file /build/scratch-text-editor-JxlBhk/scratch-text-editor-2.2.0~r1522/src/MainWindow‌​.vala: line 473: uncaught error: Erro ao criar o diretório: Permissão negada (g-io-error-quark, 14)
[_LOG_LEVEL_FATAL 09:56:27.713983] Scratch will not function properly.
[_LOG_LEVEL_DEBUG 09:56:29.189314] SplitView.vala:188: WelcomeScreen hidden succefully
[_LOG_LEVEL_DEBUG 09:56:29.191560] SplitView.vala:126: View added succefully
[_LOG_LEVEL_FATAL 09:56:29.191781] file /build/scratch-text-editor-JxlBhk/scratch-text-editor-2.2.0~r1522/src/Widgets/Do‌​cumentView.vala: line 103: uncaught error: Erro ao abrir arquivo "/home/bpantoja/.local/share/scratch-text-editor/unsaved/Ficheiro de texto de 2015-08-12 09:56:29": Arquivo ou diretório não encontrado (g-io-error-quark, 1)
[_LOG_LEVEL_FATAL 09:56:29.191834] Scratch will not function properly.
[_LOG_LEVEL_FATAL 09:56:30.724841] file /build/scratch-text-editor-JxlBhk/scratch-text-editor-2.2.0~r1522/src/Widgets/Do‌​cumentView.vala: line 103: uncaught error: Erro ao abrir arquivo "/home/bpantoja/.local/share/scratch-text-editor/unsaved/Ficheiro de texto de 2015-08-12 09:56:30": Arquivo ou diretório não encontrado (g-io-error-quark, 1)
[_LOG_LEVEL_FATAL 09:56:30.724916] Scratch will not function properly.


评论

您可以检查是否启用了源树扩展吗?启用它会删除我的标签导航

如何通过Scratch的图标或使用终端命令打开Scratch?

似乎您已经更改了主题,并且可能覆盖了+的点击区域。您可以尝试恢复为默认值,然后再尝试吗?另外,重复图形驱动程序,禁用并重试吗?

#1 楼

这是由于第一次运行Scratch作为特权用户时发生的权限错误。您最终会在~/.local/share/scratch-text-editor中找到一个您不拥有的目录。

要解决此问题:


请确保您没有任何未保存的文件以root身份运行时(使用sudo命令)在Scratch中运行。此修复程序将删除这些文件。

打开终端并使用root权限删除目录。

sudo rm -rf ~/.local/share/scratch-text-editor

以您自己的用户打开Scratch(不要使用sudo命令)

之后,您将不再遇到此问题。通常,您不应使用sudo命令运行图形应用程序,因为您会遇到这些类型的问题。

评论


@BrunoMiranda可以将系统语言设置为英语,然后使用诸如Pastebin之类的服务粘贴输出吗?听起来似乎仍然存在权限问题,但是我对葡萄牙语的理解不是很好:)

–丹尼尔·佛瑞(DanielForé)
15年8月12日在16:42

@BrunoMiranda,请将这些详细信息添加到您的问题中,而不是在评论中添加。

– RolandiXor
15年8月13日在3:44

@BrunoMiranda啊,很抱歉,整个目录似乎都由root拥有。我已经更新了说明,删除了整个目录,而不仅仅是“未保存”文件夹

–丹尼尔·佛瑞(DanielForé)
15年8月13日在18:09

丹尼尔,您好:对不起,用葡萄牙语创建问题和输出时出错。删除孔目录可以解决此问题。非常感谢你。

–布鲁诺·米兰达(Bruno Miranda)
15年8月14日在19:26



嘿,这行不通。任何帮助

–比丘(Bhikkhu Subhuti)
20-2-25在7:01