From 9ac64888340714c5a30c59b7be939431248d5a32 Mon Sep 17 00:00:00 2001 From: Nathan Janeczko Date: Tue, 10 Jul 2018 16:36:47 +0200 Subject: [PATCH 1/4] use variables from config.ini frame_height frame_width for camera resolution --- src/cli/add.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cli/add.py b/src/cli/add.py index 4a45ab3..2d82c06 100644 --- a/src/cli/add.py +++ b/src/cli/add.py @@ -85,6 +85,13 @@ video_capture = cv2.VideoCapture(int(config.get("video", "device_id"))) if config.get("video", "force_mjpeg") == "true": video_capture.set(cv2.CAP_PROP_FOURCC, 1196444237) +# Set the frame width and height if requested +if int(config.get("video", "frame_width")) != -1: + video_capture.set(cv2.CAP_PROP_FRAME_WIDTH, int(config.get("video", "frame_width"))) + +if int(config.get("video", "frame_height")) != -1: + video_capture.set(cv2.CAP_PROP_FRAME_HEIGHT, int(config.get("video", "frame_height"))) + # Request a frame to wake the camera up video_capture.read() From 8180dafdafb01a2335244b4deae42fc18939e77d Mon Sep 17 00:00:00 2001 From: boltgolt Date: Mon, 24 Sep 2018 18:05:15 +0200 Subject: [PATCH 2/4] Fixed issue where remote sessions could be authenticated through howdy --- src/config.ini | 5 ++++- src/pam.py | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/config.ini b/src/config.ini index ef65786..4e4416e 100644 --- a/src/config.ini +++ b/src/config.ini @@ -9,6 +9,9 @@ no_confirmation = false # show an error but fail silently suppress_unknown = false +# Disable Howdy in remote shells +ignore_ssh = true + # Auto dismiss lock screen on confirmation # Will run loginctl unlock-sessions after every auth # Expirimental, can behave incorrectly on some systems @@ -40,7 +43,7 @@ force_mjpeg = false # Set the camera input profile to this width and height # The largest profile will be used if set to -1 -# Automatically ignored if not a valid profile +# Automatically ignored if not a valid profile frame_width = -1 frame_height = -1 diff --git a/src/pam.py b/src/pam.py index 13e571b..5fd462e 100644 --- a/src/pam.py +++ b/src/pam.py @@ -19,6 +19,11 @@ def doAuth(pamh): if config.get("core", "disabled") == "true": sys.exit(0) + # Abort if we're in a remote SSH env + if config.get("core", "ignore_ssh") == "true": + if "SSH_CONNECTION" in os.environ or "SSH_CLIENT" in os.environ or "SSHD_OPTS" in os.environ: + sys.exit(0) + # Run compare as python3 subprocess to circumvent python version and import issues status = subprocess.call(["python3", os.path.dirname(os.path.abspath(__file__)) + "/compare.py", pamh.get_user()]) From 5b0eafd3e8b6feb4f65e234e77ade5f8b8a4dd8e Mon Sep 17 00:00:00 2001 From: boltgolt Date: Mon, 24 Sep 2018 18:13:56 +0200 Subject: [PATCH 3/4] Readme update --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 35914e0..6215556 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Howdy for Linux [![](https://img.shields.io/travis/boltgolt/howdy/master.svg)](https://travis-ci.org/boltgolt/howdy) [![](https://img.shields.io/github/release/boltgolt/howdy.svg?colorB=4c1)](https://github.com/boltgolt/howdy/releases) ![](https://boltgolt.nl/howdy_badge/installs.php?nc) ![](https://boltgolt.nl/howdy_badge/views.php) +# Howdy for Linux [![](https://img.shields.io/travis/boltgolt/howdy/master.svg)](https://travis-ci.org/boltgolt/howdy) [![](https://img.shields.io/github/release/boltgolt/howdy.svg?colorB=4c1)](https://github.com/boltgolt/howdy/releases) Windows Hello™ style authentication for Linux. Use your built-in IR emitters and camera in combination with face recognition to prove who you are. @@ -10,7 +10,7 @@ Howdy is currently available for Ubuntu/Debian and Arch Linux. If you’re inter **Note:** The build of dlib can hang on 100% for over a minute, give it time. -### Ubuntu (apt) +### Debian (Ubuntu, Linux Mint, etc) Run the installer by pasting (`ctrl+shift+V`) the following commands into the terminal one at a time: @@ -57,7 +57,9 @@ howdy [-U user] [-y] command [argument] ## Contributing [![](https://img.shields.io/travis/boltgolt/howdy/dev.svg?label=dev%20build)](https://github.com/boltgolt/howdy/tree/dev) [![](https://img.shields.io/github/issues-raw/boltgolt/howdy/enhancement.svg?label=feature+requests&colorB=4c1)](https://github.com/boltgolt/howdy/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) -You can contribute in many ways. The easiest are reporting bugs and opening github issues for features you'd like to see in howdy. Code contributions are also very welcome. +The easiest ways to contribiute to Howdy is by starring the reposotory and opening github issues for features you'd like to see. If you want to do more, you can also [buy me a coffee](https://www.buymeacoffee.com/boltgolt). + +Code contributions are also very welcome. If you want to port Howdy to another OS, feel free to contact me. ## Troubleshooting From c2ea32c1a2bad70d922911c6b940cc07d57d345d Mon Sep 17 00:00:00 2001 From: boltgolt Date: Mon, 24 Sep 2018 18:23:50 +0200 Subject: [PATCH 4/4] Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6215556..52a83ee 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ howdy [-U user] [-y] command [argument] The easiest ways to contribiute to Howdy is by starring the reposotory and opening github issues for features you'd like to see. If you want to do more, you can also [buy me a coffee](https://www.buymeacoffee.com/boltgolt). -Code contributions are also very welcome. If you want to port Howdy to another OS, feel free to contact me. +Code contributions are also very welcome. If you want to port Howdy to another distro, feel free to contact me. ## Troubleshooting