0

我正在制作一个简单的 python 程序(我称之为 prang)的 deb 包,它在当前鼠标指针处选择颜色并在文本中读出它的颜色,以利于色盲。

现在我希望在安装程序时为其分配键盘快捷键。我希望在 deb 包的 postinst 文件中做到这一点:

#! /bin/sh

set -e
chmod -R a+rx /usr/share/prang
gconftool-2 --set /apps/metacity/keybinding_commands/command_11 --type string "/usr/bin/prang"
gconftool-2 --set /apps/metacity/global_keybindings/run_command_11 --type string "<Control><Alt>C"

exit 0

prang 本身,当从终端调用时运行得很好。通过 gconf-editor 手动设置键盘快捷键可以正常工作。安装后在终端中运行 gconftool-2 命令也可以。但是通过 postinst 这样做是行不通的。我哪里错了。

4

0 回答 0