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 / 问题

问题[gedit](ubuntu)

Martin Hope
qwr
Asked: 2023-05-07 05:53:08 +0800 CST

gedit 支持什么正则表达式风格?

  • 5

在 Ubuntu 20.04 上,我的 gedit 3.36.2 版本带有一个用于查找和替换的正则表达式复选框,无需安装任何插件即可开箱即用。使用哪种正则表达式风格?

gedit
  • 1 个回答
  • 34 Views
Martin Hope
Enterprise
Asked: 2023-05-06 07:28:32 +0800 CST

帮助配置 `mimeapps.list` 以打开 gedit 而不是 gnome-text-editor?

  • 5

在 Ubuntu 23.04 上,我安装了 Gedit 和默认的文本编辑器 (gnome-text-editor)。

我想保留 gnome-text-editor,但我希望大多数文本文件在 gedit 中打开。

我已将以下内容添加到~/.config/mimeapps.list,但它不起作用——如果我*.txt在 Nautilus 中单击一个文件,它仍会在 gnome-text-editor 中打开。我在以下文件中做错了什么?

# Separate *.desktop files with a ";"

[Default Applications]
application/octet-stream=org.gnome.gedit.desktop
application/xml=org.gnome.gedit.desktop
application/json=org.gnome.gedit.desktop
text/x-patch=org.gnome.gedit.desktop
application/javascript=org.gnome.gedit.desktop
text/x-csrc=org.gnome.gedit.desktop
text/markdown=org.gnome.gedit.desktop

[Added Associations]
application/octet-stream=org.gnome.gedit.desktop
application/xml=org.gnome.gedit.desktop
application/json=org.gnome.gedit.desktop
text/x-patch=org.gnome.gedit.desktop
application/javascript=org.gnome.gedit.desktop
text/x-csrc=org.gnome.gedit.desktop

# Override R Studio mime types listed in /usr/share/applications/rstudio.desktop
text/x-tex=org.gnome.gedit.desktop
text/x-markdown=org.gnome.gedit.desktop
text/html=org.gnome.gedit.desktop
text/css=org.gnome.gedit.desktop
text/javascript=org.gnome.gedit.desktop
text/x-chdr=org.gnome.gedit.desktop
text/x-csrc=org.gnome.gedit.desktop
text/x-c++hdr=org.gnome.gedit.desktop
text/x-c++src=org.gnome.gedit.desktop
text/markdown=org.gnome.gedit.desktop
gedit
  • 1 个回答
  • 25 Views
Martin Hope
user1200336
Asked: 2021-04-06 05:37:27 +0800 CST

使用 Gedit 时如何去除纯文本文件中的无效字符?

  • 1

问题

Gedit 说我的一个使用 UTF-8 编码的文件包含无效字符,如果我继续使用它可能会损坏。

细节

有问题的文件是我的 Someday/Maybe List。我通常会在其中添加指向我想阅读的资源的链接,例如博客文章。我怀疑我添加的其中一个来源的链接包含无效字符,导致了我的问题。

我发现这里需要运行 isutf8,然后使用 xxd 或 hexdump 来扫描文件中的无效字符。运行 isutf8 是没有意义的,因为如果这个页面是正确的,它所做的只是告诉你文件是否包含无效字符。我已经阅读了一些关于 xxd 的联机帮助页,以及关于 hexdump 的其他资源,但我什么都不懂。

我试过的

不多。我担心如果我编辑它可能会破坏文件或其他东西,所以我保持不变。此外,我的研究能力很差,所以我自己也找不到解决办法。

gedit
  • 2 个回答
  • 691 Views
Martin Hope
Mohammad
Asked: 2021-01-22 03:26:37 +0800 CST

为什么“gedit”不能读取 *.FASTA 文件?

  • 0

我在 Linux 16.04 上分析了我的 *.fasta 文件。我想查看 *.fasta 文件的内容。所以我运行以下命令:

gedit SRR662431.fasta 

阅读内容的进度将开始,但一段时间后 gedit 将关闭,我在终端中看到以下消息:

(gedit:10466): Gtk-CRITICAL **: _gtk_text_line_char_locate: assertion 'char_offset >= 0' failed

(gedit:10466): Gtk-ERROR **: Char offset -2147483648 is off the end of the line
Trace/breakpoint trap (core dumped)

如果您指导我解决此问题,我将不胜感激。

gedit
  • 1 个回答
  • 35 Views
Martin Hope
yogurt
Asked: 2021-01-13 15:15:36 +0800 CST

当我打开一个非常大的文件时,gedit 背景变黑

  • 2

每当我打开一个非常大的文本文件(我说的是 10 万行或更多)时,gedit 的背景颜色会从白色变为黑色,这使得黑色文本几乎无法阅读。

这里以超过 400k 行的文件截图为例

这是gedit的错误吗?我能做些什么来阻止它变成黑色背景?

gedit
  • 2 个回答
  • 1142 Views
Martin Hope
Sergey
Asked: 2020-11-29 00:57:58 +0800 CST

从终端使用参数启动 gedit 会导致错误 (gedit:47653):GLib-GIO-CRITICAL

  • 2

如果我gedit -w -s从终端运行,则会出现错误:

(gedit:47653): GLib-GIO-CRITICAL **: 12:20:04.475: g_dbus_action_group_get: assertion 'bus_name != NULL || g_dbus_connection_get_unique_name (connection) == NULL' failed
Segmentation fault (core dumped).

如果我在gedit没有终端参数的情况下运行,它会成功启动。我的 Ubuntu 版本是 20.04.1 LTS Focal Fossa。在以前的 Bionic Beaver 版本的 Ubuntu 中gedit -w -s运行时没有错误。

command-line gedit 20.04
  • 1 个回答
  • 556 Views
Martin Hope
cheeseyboi
Asked: 2020-10-29 22:50:50 +0800 CST

我将如何更改 gedit 主题/配色方案?(20.04 升)

  • 2

目前每次我尝试运行 gedit 我都会收到以下错误:

** (gedit:42831): WARNING **: 17:39:58.054: Default style scheme 'pop-light' cannot be found, falling back to 'classic' style scheme

** (gedit:42831): WARNING **: 17:39:58.058: Loading metadata failed: The specified location is not mounted

我之前确实运行过 Pop!_OS 主题,但这是我在切换回默认设置并删除 Pop!_OS 主题时开始遇到的错误。

gnome themes gedit
  • 1 个回答
  • 338 Views
Martin Hope
Dan M.
Asked: 2020-10-22 03:19:22 +0800 CST

是否可以在 20.04 中恢复 gedit 打开最近文件下拉菜单中的搜索框?

  • 6

从 18.04 升级到 20.04 后,我注意到当我尝试打开最近的文件时,不再有方便的搜索框。只有最后 10 个打开的文件的下拉列表(如图所示)。

图片来自 https://askubuntu.com/questions/888984/why-is-gedit-not-populating-the-open-recent-files-menu-option-on-16-04

是否有可能将旧的下拉菜单带回来?如果是,如何?

gnome gedit 20.04
  • 1 个回答
  • 161 Views
Martin Hope
Ph4edrus
Asked: 2020-10-04 01:10:30 +0800 CST

Ubuntu 20.04 中的 Gedit 图标在哪里

  • 2

短版:Ubuntu 在菜单等中用于 Gedit 的图标文件在哪里?

说明:我在 ubuntu 中使用 cairo-dock。我为 Gedit 的面板添加了一个快捷方式。现在 cairo-dock 已经给了它默认的问号图标。我想将 cairo-dock 指向 gedit 的正确图标。我浏览过 /usr/share 和 /usr/local/share 搜索“icons”、“images”等文件夹,但它是一个由不同位置和名为“icons”的文件夹组成的令人眼花缭乱的丛林。

任何指向正确方向的指针将不胜感激。

icons gedit
  • 1 个回答
  • 454 Views
Martin Hope
user1046658
Asked: 2020-08-12 17:15:14 +0800 CST

无法在 gedit 中单击首选项中的复选框

  • 2

当我使用geditinUbuntu 20.04时,每当我单击 中的任何复选框时Preferences,都不会发生任何事情。

喜好

例如,当我单击 时Display line numbers,该复选框仍标记为已选中。出于某种原因,点击Display grid pattern、Enable text wrapping、 和Do not split words over two lines可以,但是当我退出Preferences并重新进入时,它们会回到原来的状态,如图所示。

其他选项卡中的所有其他选项都无法更改。

编辑:作为普通用户使用时显然Preferences有效,而不是root用户。gedit以前,我试图更改Preferences为 root

现在,我想知道为什么 Preferences 不能以 root 身份更改。我注意到,当我gedit以普通用户身份使用时,终端上没有弹出任何内容,但是当我gedit以 root 身份打开时,终端中会显示以下消息:

(gedit:2024): dconf-WARNING **: 21:01:08.260: failed to commit changes to dconf: The connection is closed

(gedit:2024): dconf-WARNING **: 21:01:08.270: failed to commit changes to dconf: The connection is closed
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)

(gedit:2024): dconf-WARNING **: 21:01:08.509: failed to commit changes to dconf: The connection is closed

(gedit:2024): dconf-WARNING **: 21:01:08.509: failed to commit changes to dconf: The connection is closed

(gedit:2024): dconf-WARNING **: 21:01:08.510: failed to commit changes to dconf: The connection is closed
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)

(gedit:2024): dconf-WARNING **: 21:04:00.840: failed to commit changes to dconf: The connection is closed
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
gedit preferences 20.04
  • 1 个回答
  • 261 Views

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