I am not running the application itself as root.
Rather than do a convoluted
pkexec sh -c \'echo 50 > /sys/de