サイトカスタムキーバインディングのdconfオーバーライドを作成する方法は?

サイトカスタムキーバインディングのdconfオーバーライドを作成する方法は?

dconfを使用してカスタムキーバインディングを追加したいと思います。以前は、gconf を使用して同じ操作を正常に実行しました。しかし、dconfの使用にはいくつかの問題があります。

(私はDebianパッケージを開発しているので、ファイルベースのカバレッジはパッケージ化が簡単です。)

これが私が持っているものです:

# cat /etc/dconf/profile/user:
user-db:user
system-db:site

# cat /etc/dconf/db/site.d/keybindings
[org/mate/desktop/keybindings/emacs]
action='emacs'
binding='<Mod4>e'
name='Emacs'

[org/mate/desktop/keybindings/pluma]
action='pluma'
binding='<Mod4>g'
name='Text Editor'

[org/mate/desktop/keybindings/virtualbox]
action='virtualbox'
binding='<Mod4>v'
name='Virtual Box'

[org/mate/desktop/keybindings/rhythmbox]
action='rhythmbox'
binding='<Mod4>r'
name='Music Player'

# sudo dconf update

ご覧のとおり、ファイルには/etc/dconf/db/site.d/keybindings4つのキーバインディングが含まれていますが、Emacsの場合は最初のキーバインディングWin+だけが機能しますE。他のキーバインディングは機能しません。

アイテムをpluma最初またはvirtualbox最初に並べ替えることができますが、同じ問題が再発生します。最初の項目だけが機能します。つまり、Win+はGPlumaを意味し、Win+はVVirtualBoxを意味します。しかし、これらのキーバインディングを同時にすべて持つことはできません!

しかし、ちょっと待ってください.../etc/dconf/db/site.d/keybindings次に移動して$HOME/.config/dconf/user.d/keybindings実行すると、次のようになります。

# cd ~/.config/dconf
# mkdir user.d
# mv /etc/dconf/db/site.d/keybindings user.d/keybindings
# sudo dconf update .

その後、すべてがうまく動作します!まあ、私はDebianパッケージを書いているので、ユーザーのhomedirにファイルをインストールできないので、まだこの問題に直面しています。

ベストアンサー1

おすすめ記事