From 0521393416dddbea6a0800f191b3082a333a15a7 Mon Sep 17 00:00:00 2001 From: Tyler Porter Date: Tue, 27 Feb 2024 01:20:08 -0500 Subject: [PATCH] Do not drop privilege when running RGBM --- README.md | 1 + utils.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index a2bf8b08..ab275517 100755 --- a/README.md +++ b/README.md @@ -294,6 +294,7 @@ You can configure your LED matrix with the same flags used in the [rpi-rgb-led-m --led-pwm-dither-bits Time dithering of lower bits (Default: 0) --config Specify a configuration file name other, omitting json xtn (Default: config) --emulated Force the scoreboard to run in software emulation mode. +--drop-privileges Force the matrix driver to drop root privileges after setup. (Default: false) ``` ## Personalization diff --git a/utils.py b/utils.py index 05119a72..237b80f6 100644 --- a/utils.py +++ b/utils.py @@ -126,6 +126,9 @@ def args(): help="Force using emulator mode over default matrix display.", const=True ) + parser.add_argument( + "--drop-privileges", action="store_false", help="Force the matrix driver to drop root privileges after setup." + ) return parser.parse_args() @@ -148,6 +151,7 @@ def led_matrix_options(args): options.scan_mode = args.led_scan_mode options.pwm_lsb_nanoseconds = args.led_pwm_lsb_nanoseconds options.led_rgb_sequence = args.led_rgb_sequence + options.drop_privileges = args.drop_privileges try: options.pixel_mapper_config = args.led_pixel_mapper