Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not drop root privilege when running in venv #521

Merged
merged 3 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: true)
```

## Personalization
Expand Down
4 changes: 4 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ def args():
help="Force using emulator mode over default matrix display.",
const=True
)
parser.add_argument(
"--drop-privileges", action="store_true", help="Force the matrix driver to drop root privileges after setup."
)
return parser.parse_args()


Expand All @@ -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
Expand Down
Loading