Hello I am using crunchbang plus plus on a dell/wyse 5470 thin client and I want to add a OpenBox menu item to turn on and off my wireguard vpn with the sudo wg-quick up wg0 and sudo wg-quick down wg0 commands

currently I have

<menu id="menu-1473049" label="Wireguard">
      <item label="VPN On">
        <action name="Execute">
          <command>wg-quick up wg0</command>
        </action>
      </item>
      <item label="VPN Off">
        <action name="Execute">
          <command>wg-quick down wg0</command>
        </action>
      </item>
    </menu>

but nothing happens when I click them, also I tried with sudo in the command name and it didnt work either and Im not sure how it would ask for my password from a menu command? is this even possible?

  • Jears@social.jears.at
    link
    fedilink
    arrow-up
    1
    ·
    10 months ago

    Alternatively you can launch sudo inside a terminal window. For example with xterm: xterm -e sudo [some command] [some arguments] […] This will pop up a terminal window to type your password in.

    Pretty sure almost all terminal emulators have a similar argument.