0

So I added the following command into my lubuntu-rc.xml document:

alias pbpaste='xclip -selection clipboard -o';vlc -vvv $(pbpaste)

and whenever I try to do the shortcut C-l-c, nothing happens.

Is there a specific way commands have to be done in this XML file to work?

This is my XML entry:

<keybind key="C-l-c">
      <action name="Execute">
        <command>alias pbpaste='xclip -selection clipboard -o;vlc -vvv $(pbpaste)</command>

      </action>
    </keybind>
  • • Please show us the exact part of your lubuntu-rc.xml. In other words, please post the relevant <keybind> … </keybind>. • Keep in mind that not all characters work in <command> … </command>. You may need to escape some characters: see here for hints. • Sometimes, it maybe better to write a script and then assign a shortcut to that script. • BTW, what is C-l-c? – Justice for Monica Sep 20 at 9:12
  • @DKBose This is my XML entry as it is right now – explodingfilms101 Sep 20 at 10:27
  • Did the answer I provided below work for you? – Justice for Monica Sep 24 at 11:37
1

This works for me on Lubuntu 18.04:

<keybind key="C-W-C">        # my vlc
  <action name="Execute">
    <command>sh -c 'vlc -vvv "$(xclip -o)"'</command>
  </action>
</keybind>

Remember to run openbox --reconfigure after saving your edits to lubuntu-rc.xml.

If you have any output from openbox --reconfigure, you'll need to fix the issues mentioned.


Edit: You normally1 can't have shortcuts with two non-modifier keys. Common modifier keys are C (for Control), A (for Alt), S (for Shift) and W (for Windows aka Super).

1 See https://web.archive.org/web/20190815101235/http://openbox.org/wiki/Help:Bindings for more:

Key combination

KEY-COMBINATION is the key combination which you want to bind to the actions. The format for the KEY-COMBINATION is: Modifier-Modifier-Key. Any number of modifiers (0 or more) can be used together, and they are each separated by a "-". Multiple KEY-COMBINATION can be specified in one keybind by separating them with spaces. This is useful if you use multiple keybinds for a thing that is quite complicated to specify.

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.