如何使用命令行将应用程序快捷方式添加到 gnome-classic 中的面板?
我以前dconf watch /
手工操作的时候经常会看到发生了什么,但是当我尝试自己重现这种情况时:
dmd@rossum:~ $ dconf write '/org/gnome/gnome-panel/layout/objects/test1234/object-iid' 'PanelInternalFactory::Launcher'
error: 0-1:unknown keyword
我马上就遇到麻烦了。
如何使用命令行将(例如)终端启动器图标添加到面板?
答案1
# add terminal launcher to the bar
dconf load /org/gnome/gnome-panel/layout/objects/terminal/ << EOT
[instance-config]
location='/usr/share/applications/gnome-terminal.desktop'
[/]
object-iid='PanelInternalFactory::Launcher'
pack-index=99
pack-type='end'
toplevel-id='top-panel'
EOT
dconf write /org/gnome/gnome-panel/layout/object-id-list "$(dconf read /org/gnome/gnome-panel/layout/object-id-list | sed "s/]/, 'terminal']/")"