AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1235728
Accepted
Abhay Patil
Abhay Patil
Asked: 2020-05-06 08:09:59 +0800 CST2020-05-06 08:09:59 +0800 CST 2020-05-06 08:09:59 +0800 CST

在 gedit 中保存文件会在终端中打印警告

  • 772

我最近在 Ubuntu 20.04 LTS 上安装了来自gnome-look.org的 GRUB 主题(我的 PC 是带有 Ubuntu 的 Windows 10 双启动)。要成功安装主题,/etc/default/grub需要编辑文件。

所以我使用sudo gedit /etc/default/grub命令来这样做。保存后编辑后,在终端中看到以下警告:

在此处输入图像描述

(gedit:7169): Tepl-WARNING **: 21:13:18.135: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.

后来我还/boot/grub/grub.cfg通过使用sudo gedit /boot/grub/grub.cfg.

保存文件后,我收到了类似的警告

在此处输入图像描述

(gedit:8887): Tepl-WARNING **: 21:18:46.163: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.

有人可以告诉我原因吗?以及如何处理?

gnome grub2 boot gedit gvfs
  • 6 6 个回答
  • 41618 Views

6 个回答

  • Voted
  1. Best Answer
    Tamir Daniely
    2020-10-24T08:13:09+08:002020-10-24T08:13:09+08:00
    1. 这并不重要,元数据似乎只是您所在的最后一个行号,因此文件将在同一位置重新打开。您可以使用gio info <path>.

    2. 不要 sudo gnome 应用程序。使用“admin://”模式告诉 gedit 它需要升级。您将获得图形升级提示。

    gedit admin:///etc/default/grub

    关于升级混乱的很好解释:

    https://easylinuxtipsproject.blogspot.com/p/about-root.html

    • 10
  2. heynnema
    2020-05-06T09:52:16+08:002020-05-06T09:52:16+08:00

    每当您想从 CLI 打开具有 sudo 权限的 GUI 应用程序时terminal,您必须使用sudo -H,否则您可能会创建一个登录循环。

    sudo -H gedit /etc/default/grub
    

    从man sudo我们得到 -H 描述......

    -H, --set-home
                 Request that the security policy set the HOME environment
                 variable to the home directory specified by the target user's
                 password database entry.  Depending on the policy, this may
                 be the default behavior.
    

    翻译这意味着如果你不使用-H,你/home目录中的这两个文件可能会被更改为所有者root:root,你会得到一个登录循环......

    -rw------- 1 your_username your_username 441K Nov  2  2019 .ICEauthority
    -rw------- 1 your_username your_username   58 Jun 23  2017 .Xauthority
    

    警告信息……它们只是噪音。

    而且,您永远不应该手动编辑 /boot/grub/grub.cfg。

    更新#1:

    要减少手动编辑 /boot/grub/grub.cfg 的需要,请将以下内容编辑/添加到 /etc/default/grub...

    GRUB_DEFAULT=saved    # this is an edit
    GRUB_SAVEDEFAULT=true # this is an add
    

    sudo update-grub# 写入更改

    这将允许 GRUB 记住最后选择的要引导的操作系统,并将重新引导到同一个操作系统,直到选择了不同的操作系统。

    • 7
  3. Harry Daniiels
    2021-03-31T05:28:58+08:002021-03-31T05:28:58+08:00

    安装 gvfs 并不会阻止错误消息。在我自己的情况下,“gvfs 已经是最新版本(1.44.1-1ubuntu1)”,但是每当我使用“sudo gedit”或“sudo -H gedit”“gedit”文档时,错误仍然会弹出警告。我还没有找到关于如何解决该 tepl 问题的明确方向,我的系统运行良好,警告仅在使用“sudo gedit”时出现。

    但是,我在某处发现了一个类似这样的解决方法,并且“sudo gedit”没有给出错误或警告:

    " 或者,您可以在 .bashrc 文件中输入: export SUDO_EDITOR='/usr/bin/gedit -w' 然后您可以这样做来编辑文件: sudoedit /etc/default/grub "

    • 3
  4. dlin
    2020-05-06T08:17:55+08:002020-05-06T08:17:55+08:00

    gedit这是一个没有开始的警告sudo-H(请参阅sudo -H 做什么?)。确保你开始它

    sudo -H gedit file
    

    或者您可以使用终端编辑器,如 vi、vim 或 emacs。

    • 1
  5. Bern
    2020-08-19T07:20:27+08:002020-08-19T07:20:27+08:00

    我只有 ubuntu 20.04,没有多重引导,更新了 pkgs,sudo gedit 和 sudo -H gedit 都继续发出 Tepl 警告,主要是 GVfs 元数据。
    上述答复方尚未解决该问题,也没有说直到 20.04 才成为问题。通过扫描 pkgs,20.04 使用“libtepl-4-0”,其通过 apt show 的描述为:

    Description: Text editor library for GTK
    

    Tepl 是一个简化基于 GtkSourceView 的文本编辑器和 IDE 开发的库。Tepl 是“文本编辑器产品线”的首字母缩写。它作为 GtkSourceView 的孵化器。

    猜测配置 tepl 的错误消息提示可能会起作用,只要它包含要配置的文件,而不仅仅是要应用的选项!:)

    • 1
  6. mahdi26
    2020-11-10T03:04:14+08:002020-11-10T03:04:14+08:00

    您需要通过以下命令安装 gvfs:

    sudo apt-get install gvfs
    
    • 0

相关问题

  • 如何在 Ubuntu 启动时显示或隐藏启动消息?

  • 是否有适用于 IMAP 邮件帐户的 Gnome 小程序?

  • Gedit 中是否支持拆分窗格?

  • 如何避免启动时出现“S to Skip”消息?

  • 如果顶部面板中缺少会话小程序,如何注销?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve