SoTecWare.net

»Imagination is more important than knowledge, for knowledge is limited.«Albert Einstein


Linux helper script collection

tiny helpers with great power

Here is a small collection of useful scripts which use the power of python and unix to shine up my desktop (sorted alphabetically).

  • 30-openvpn – dispatcher.d script for openvpn

    NetworkManagers openvpn support is not quite complete yet. So to start my vpn connection every time my main link comes up, I created the script linked above.

    Just adapt the variables in the global scope to your needs and put it in /etc/NetworkManager/dispatcher.d. Make sure it is set executable.

    SELinux Tip: As openvpn is then started by a confined daemon, you may need to watch out for selinux alerts regarding openvpn and allow openvpn to bind to the udp port set in your config.

    Requirements:
    • /usr/bin/python3
    • NetworkManager
    • killall
    • ip (from iproute2)
    • openvpn
  • pavolctl.py – PulseAudio volume control

    A helper script which allows to change the volume and mute status of an arbitary pulse audio sound sink. The advantage is its easy use compared with directly interfacing with pacmd and that it allows to set the volume level relatively to the current one.

    Although many desktop environments automagically bind the volume keys to control the volume of the default sink, you can use this script to bind the same or other keys to control different sinks, identified by either the index or the name of the sink (i.e. everything pacmd set-sink-* accepts as a sink identifier).

    For more help see pavolctl.py -h.

    Requirements:
    • /usr/bin/python3
    • pacmd
    • pactl