当我以非 root 身份打开 gedit 时,出现了如屏幕截图所示的奇怪故障:
但是,当我在终端中输入“sudo gedit”时,它可以正常工作。
我的显卡是英特尔公司 Iris Graphics 6100,我正在使用 Ubuntu 18.04 LTS。
这是我的 gedit 设置的当前输出:
$ gsettings list-recursively | grep -i gedit
org.gnome.gedit.preferences.ui bottom-panel-visible false
org.gnome.gedit.preferences.ui max-recents uint32 5
org.gnome.gedit.preferences.ui statusbar-visible true
org.gnome.gedit.preferences.ui show-tabs-mode 'auto'
org.gnome.gedit.preferences.ui side-panel-visible false
org.gnome.gedit.preferences.ui toolbar-visible true
org.gnome.gedit.plugins active-plugins ['filebrowser', 'modelines', 'spell', 'time', 'docinfo']
org.gnome.gedit.state.history-entry search-for-entry ['']
org.gnome.gedit.state.history-entry replace-with-entry ['']
org.gnome.gedit.preferences.print print-syntax-highlighting true
org.gnome.gedit.preferences.print margin-bottom 25.0
org.gnome.gedit.preferences.print print-font-numbers-pango 'Sans 8'
org.gnome.gedit.preferences.print print-header true
org.gnome.gedit.preferences.print print-line-numbers uint32 0
org.gnome.gedit.preferences.print print-wrap-mode 'word'
org.gnome.gedit.preferences.print margin-top 15.0
org.gnome.gedit.preferences.print print-font-body-pango 'Monospace 9'
org.gnome.gedit.preferences.print margin-left 25.0
org.gnome.gedit.preferences.print margin-right 25.0
org.gnome.gedit.preferences.print print-font-header-pango 'Sans 11'
org.gnome.shell favorite-apps ['org.gnome.Nautilus.desktop', 'gnome-control-center.desktop', 'org.gnome.Terminal.desktop', 'notepadqq.desktop', 'firefox.desktop', 'runescape-oldschool.desktop', 'discord.desktop', 'org.gnome.gedit.desktop']
org.gnome.gedit.preferences.encodings candidate-encodings ['']
org.gnome.gedit.state.window size (644, 352)
org.gnome.gedit.state.window state 43908
org.gnome.gedit.state.window bottom-panel-active-page ''
org.gnome.gedit.state.window bottom-panel-size 140
org.gnome.gedit.state.window side-panel-active-page 'GeditWindowDocumentsPanel'
org.gnome.gedit.state.window side-panel-size 200
org.gnome.desktop.notifications application-children ['org-gnome-software', 'discord', 'org-gnome-nautilus', 'hexchat', 'org-gnome-dejadup', 'gnome-control-center', 'libreoffice-writer', 'firefox', 'apport-gtk', 'org-gnome-gedit', 'wireshark', 'org-gnome-terminal', 'gnome-network-panel', 'notepadqq', 'org-gnome-totem', 'eog', 'shotwell', 'virtualbox', 'thunderbird', 'update-manager', 'org-gnome-cheese', 'indicator-stickynotes']
org.gnome.gedit.plugins.time selected-format '%c'
org.gnome.gedit.plugins.time prompt-type 'prompt-selected-format'
org.gnome.gedit.plugins.time custom-format '%d/%m/%Y %H:%M:%S'
org.gnome.gedit.plugins.filebrowser.nautilus confirm-trash true
org.gnome.gedit.plugins.filebrowser.nautilus click-policy 'double'
org.gnome.gedit.plugins.filebrowser binary-patterns ['*.la', '*.lo']
org.gnome.gedit.plugins.filebrowser filter-mode ['hide-hidden', 'hide-binary']
org.gnome.gedit.plugins.filebrowser filter-pattern ''
org.gnome.gedit.plugins.filebrowser tree-view true
org.gnome.gedit.plugins.filebrowser open-at-first-doc true
org.gnome.gedit.plugins.filebrowser virtual-root 'file:///etc/modprobe.d'
org.gnome.gedit.plugins.filebrowser enable-remote false
org.gnome.gedit.plugins.filebrowser root 'file:///'
org.gnome.gedit.preferences.editor wrap-mode 'word'
org.gnome.gedit.preferences.editor display-right-margin false
org.gnome.gedit.preferences.editor highlight-current-line false
org.gnome.gedit.preferences.editor search-highlighting true
org.gnome.gedit.preferences.editor display-overview-map false
org.gnome.gedit.preferences.editor create-backup-copy false
org.gnome.gedit.preferences.editor auto-save false
org.gnome.gedit.preferences.editor restore-cursor-position true
org.gnome.gedit.preferences.editor bracket-matching false
org.gnome.gedit.preferences.editor scheme 'classic'
org.gnome.gedit.preferences.editor display-line-numbers true
org.gnome.gedit.preferences.editor editor-font 'Monospace 12'
org.gnome.gedit.preferences.editor insert-spaces false
org.gnome.gedit.preferences.editor right-margin-position uint32 80
org.gnome.gedit.preferences.editor tabs-size uint32 8
org.gnome.gedit.preferences.editor background-pattern 'none'
org.gnome.gedit.preferences.editor use-default-font true
org.gnome.gedit.preferences.editor ensure-trailing-newline true
org.gnome.gedit.preferences.editor wrap-last-split-mode 'word'
org.gnome.gedit.preferences.editor smart-home-end 'after'
org.gnome.gedit.preferences.editor auto-indent false
org.gnome.gedit.preferences.editor max-undo-actions 2000
org.gnome.gedit.preferences.editor auto-save-interval uint32 10
org.gnome.gedit.preferences.editor syntax-highlighting true
org.gnome.gedit.state.file-filter filter-id 0
org.gnome.gedit.plugins.pythonconsole command-color '#314e6c'
org.gnome.gedit.plugins.pythonconsole use-system-font true
org.gnome.gedit.plugio fixns.pythonconsole error-color '#990000'
org.gnome.gedit.plugins.pythonconsole font 'Monospace 10'
org.gnome.gedit.plugins.externaltools use-system-font true
org.gnome.gedit.plugins.externaltools font 'Monospace 10'
更新:我刚刚尝试自己修复此问题并执行了以下步骤:
- 已退出当前会话。
- 选择要登录的用户。
- 单击齿轮图标并切换到 wayland 上的 ubuntu(我使用的是 ubuntu)
这解决了我的问题并且 gedit 现在运行正常。
答案1
最后找到了解决方案:只需删除~/.xinputrc