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 / 问题 / 1159737
Accepted
Philippe Fanaro
Philippe Fanaro
Asked: 2019-07-21 09:55:32 +0800 CST2019-07-21 09:55:32 +0800 CST 2019-07-21 09:55:32 +0800 CST

如何通过终端执行 Alt + F2 + r + Return (Gnome Shell Reset)

  • 772

我正在尝试自动安装 Gnome Tweaks 扩展(Dash to Panel),最后,它需要我通过Alt+ F2+ r+重新启动 Gnome Shell Return(我认为 Gnome Tweaks 也需要它)。我将如何通过 bash 脚本来做到这一点?

我已经通过一个名为的库进行了尝试,xdotool但由于某种原因它无法识别最终Return(或KP_Enter=数字键盘返回)。

xdotool key Alt+F2+r+Return 
# `xdotool key "Alt+F2+r" && xdotool key "Return"` won't work either

我也尝试过类似gnome-shell --replaceor的命令,killall gnome-shell但它们要么杀死 gnome shell,要么在终端上给我返回一堆可怕的警告消息,告诉我某些内容可能已被覆盖。如果我在那之后在终端上尝试Ctrl+ C,那么这次 Gnome Shell 将永远消失,我必须重置我的 PC。

这样做的正确方法是什么?

警告信息:

$ gnome-shell -r

current session already has an ibus-daemon.
GNOME Shell-Message: 15:53:28.012: Telepathy is not available, chat integration will be disabled.
Gjs-Message: 15:53:28.122: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/appIcons.js 1028]: unreachable code after return statement

(gnome-shell:4088): Gjs-CRITICAL **: 15:53:28.145: Object .Gjs_DashToPanel-PreviewMenu (0x559054ff2650), has been already finalized. Impossible to set any property to it.
== Stack trace for context 0x5590534d94c0 ==
#0 0x7ffe2cb772c0 I   resource:///org/gnome/gjs/modules/_legacy.js:83 (0x7f1b084b5de0 @ 87)
#1 0x5590538aecd8 i   /home/philippe/.local/share/gnome-shell/extensions/[email protected]/taskbar.js:366 (0x7f1ae4fd0560 @ 93)
#2 0x7ffe2cb77ea0 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f1b084b5de0 @ 71)
#3 0x5590538aec38 i   /home/philippe/.local/share/gnome-shell/extensions/[email protected]/panel.js:293 (0x7f1ae4fcb450 @ 410)
#4 0x7ffe2cb78a80 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f1b084b5de0 @ 71)
#5 0x5590538aebb8 i   /home/philippe/.local/share/gnome-shell/extensions/[email protected]/panelManager.js:212 (0x7f1ae4fa8de0 @ 69)
#6 0x7ffe2cb79780 b   self-hosted:251 (0x7f1b084c4ab0 @ 223)
#7 0x5590538aeb28 i   /home/philippe/.local/share/gnome-shell/extensions/[email protected]/panelManager.js:199 (0x7f1ae4fa8d58 @ 72)
#8 0x7ffe2cb7a550 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f1b084b5de0 @ 71)
#9 0x5590538aea68 i   /home/philippe/.local/share/gnome-shell/extensions/[email protected]/extension.js:109 (0x7f1ae4fa82b8 @ 12)
#10 0x5590538ae9b0 i   /home/philippe/.local/share/gnome-shell/extensions/[email protected]/extension.js:79 (0x7f1ae4fa81a8 @ 267)
#11 0x5590538ae938 i   /home/philippe/.local/share/gnome-shell/extensions/[email protected]/extension.js:55 (0x7f1ae4fa8120 @ 48)
#12 0x7ffe2cb7b860 b   resource:///org/gnome/gjs/modules/signals.js:128 (0x7f1b084d2230 @ 386)
#13 0x5590538ae888 i   resource:///org/gnome/shell/ui/extensionSystem.js:137 (0x7f1b08259340 @ 554)
#14 0x5590538ae7f0 i   resource:///org/gnome/shell/ui/extensionSystem.js:181 (0x7f1b08259450 @ 241)
#15 0x5590538ae770 i   resource:///org/gnome/shell/ui/extensionSystem.js:328 (0x7f1b08259b38 @ 13)
#16 0x7ffe2cb7cbf0 b   resource:///org/gnome/gjs/modules/signals.js:128 (0x7f1b084d2230 @ 386)
#17 0x5590538ae690 i   resource:///org/gnome/shell/misc/extensionUtils.js:191 (0x7f1b0825e2b8 @ 459)
#18 0x7ffe2cb7d860 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f1b084b5de0 @ 71)
#19 0x5590538ae600 i   resource:///org/gnome/shell/misc/extensionUtils.js:197 (0x7f1b0825e3c8 @ 28)
#20 0x7ffe2cb7e560 b   resource:///org/gnome/shell/misc/fileUtils.js:27 (0x7f1b0825e4d8 @ 323)
#21 0x5590538ae570 i   resource:///org/gnome/shell/misc/extensionUtils.js:196 (0x7f1b0825e340 @ 72)
#22 0x7ffe2cb7f1c0 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f1b084b5de0 @ 71)
#23 0x5590538ae4e0 i   resource:///org/gnome/shell/ui/extensionSystem.js:330 (0x7f1b08259ab0 @ 201)
#24 0x5590538ae460 i   resource:///org/gnome/shell/ui/extensionSystem.js:338 (0x7f1b08259bc0 @ 36)
#25 0x5590538ae3e0 i   resource:///org/gnome/shell/ui/extensionSystem.js:369 (0x7f1b08259de0 @ 67)
#26 0x5590538ae358 i   resource:///org/gnome/shell/ui/extensionSystem.js:377 (0x7f1b08259e68 @ 41)
#27 0x5590538ae2c8 i   resource:///org/gnome/shell/ui/main.js:229 (0x7f1b084da340 @ 1152)
#28 0x5590538ae240 i   resource:///org/gnome/shell/ui/main.js:133 (0x7f1b084da230 @ 237)
#29 0x5590538ae1c8 i   <main>:1 (0x7f1b08486b38 @ 48)

(gnome-shell:4088): Gjs-WARNING **: 15:53:28.384: Some code accessed the property 'getUniqueBusNameSync' on the module 'util'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Ubuntu AppIndicators-Message: 15:53:28.385: [AppIndicatorSupport-DEBUG] Registering StatusNotifierItem :1.93/StatusNotifierItem
Ubuntu AppIndicators-Message: 15:53:28.388: [AppIndicatorSupport-DEBUG] Registering StatusNotifierItem :1.89/org/ayatana/NotificationItem/software_update_available
Ubuntu AppIndicators-Message: 15:53:28.391: [AppIndicatorSupport-DEBUG] Registering StatusNotifierItem :1.89/org/ayatana/NotificationItem/livepatch
GNOME Shell-Message: 15:53:28.453: Error looking up permission: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.impl.portal.PermissionStore was not provided by any .service files

(gnome-shell:4088): Gjs-WARNING **: 15:53:35.464: Some code accessed the property 'refreshPropertyOnProxy' on the module 'util'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
command-line shortcut-keys bash gnome-shell
  • 1 1 个回答
  • 2396 Views

1 个回答

  • Voted
  1. Best Answer
    Michael the W
    2019-08-05T08:13:29+08:002019-08-05T08:13:29+08:00

    在发送返回之前插入一些延迟:

    xdotool key "Alt+F2+r" && sleep 0.5 && xdotool key "Return"
    
    • 5

相关问题

  • 如何从命令行仅安装安全更新?关于如何管理更新的一些提示

  • 如何从命令行刻录双层 dvd iso

  • 如何从命令行判断机器是否需要重新启动?

  • 文件权限如何工作?文件权限用户和组

  • 如何在 Vim 中启用全彩支持?

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