0

I am trying to add a new application shortcut in the command line which will load the terminal when you press Ctrl + Alt + T.

I am using the xfconf-query utility to monitor xfce4-keyboard-shortcuts and the output I get when setting my shortcut via the Keyboard GUI is: /commands/custom/<Primary><Alt>t.

XFCE4 Keyboard settings

I've been able to set other settings from the command line, for example changing the theme using the following command:

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

However, I am not sure how to apply this a similar logic to my application shortcut, I just keep getting errors. Would anyone happen to have any ideas?

I tried the following command:

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

but I got the follow error message:

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.

Thank you in advance.

1 Answer 1

1

If the property doesn't exist, it's necessary to create it using the --create option (or the synonymous -n) as indicated in the error. The following worked for me...

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

Note that it was also necessary to add the type of the value, although 'String' as found for a type in the Xfce Settings Editor wouldn't work; it had to be 'string'.

1
  • Thank you so much, this solved my problem. Despite there already being a shortcut entry assigned to xfce4-terminal a whole new entry needs to be made to accommodate the shortcut I want to use to load the terminal.
    – Hymcode
    Nov 23, 2021 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.