从终端 (CentOS) 创建 XFCE4 应用程序快捷方式

从终端 (CentOS) 创建 XFCE4 应用程序快捷方式

我正在尝试在命令行中添加一个新的应用程序快捷方式,当您按 时,该快捷方式将加载终端Ctrl + Alt + T

我正在使用该xfconf-query实用程序进行监控xfce4-keyboard-shortcuts,通过键盘 GUI 设置快捷方式时得到的输出是:/commands/custom/<Primary><Alt>t

XFCE4 键盘设置

我已经能够从命令行设置其他设置,例如使用以下命令更改主题:

xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita"

但是,我不确定如何将类似的逻辑应用到我的应用程序快捷方式中,我只是不断收到错误。有人会碰巧有什么想法吗?

我尝试了以下命令:

xfconf-query -c xfce4-keyboard-shortcuts -p '/commands/custom/<Primary><Alt>t' -s xfce4-terminal

但我收到以下错误消息:

Property "/commands/custom/<Primary><Alt>t" does not exist on channel "xfce4-keyboard-shortcuts". If a new property should be created, use the --create option.

先感谢您。

答案1

如果该属性不存在,则需要使用错误中指示的--create选项(或同义)创建它。-n以下内容对我有用......

xfconf-query -c xfce4-keyboard-shortcuts -n -t 'string' -p '/commands/custom/<Primary><Alt>t' -s xfce4-terminal

请注意,还需要添加值的类型,尽管在 Xfce 设置编辑器中找到的类型“字符串”不起作用;它必须是“字符串”。

相关内容