Monday, May 6, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 4476  / 2 Years ago, mon, december 13, 2021, 2:40:07

I would like to install openconnect-ssh. The install instructions from the project seem complex, I'm not sure what pipx is.


How do I install openconnect-sso on Ubuntu without using pipx and using native Ubuntu qt libraries?


I tried to install it using pip, but I got the following errors:


Traceback (most recent call last):
File "/home/merlijn/.local/bin/openconnect-sso", line 5, in <module>
from openconnect_sso.cli import main
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/cli.py", line 10, in <module>
from openconnect_sso import app, config, __version__
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/app.py", line 16, in <module>
from openconnect_sso.authenticator import Authenticator, AuthResponseError
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/authenticator.py", line 6, in <module>
from openconnect_sso.saml_authenticator import authenticate_in_browser
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/saml_authenticator.py", line 3, in <module>
from openconnect_sso.browser import Browser
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/browser/__init__.py", line 1, in <module>
from .browser import Browser, DisplayMode, Terminated
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/browser/browser.py", line 5, in <module>
from . import webengine_process as web
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/browser/webengine_process.py", line 12, in <module>
from PyQt5.QtCore import QUrl, QTimer
ModuleNotFoundError: No module named 'PyQt5'

Traceback (most recent call last):
File "/home/merlijn/.local/bin/openconnect-sso", line 5, in <module>
from openconnect_sso.cli import main
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/cli.py", line 10, in <module>
from openconnect_sso import app, config, __version__
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/app.py", line 16, in <module>
from openconnect_sso.authenticator import Authenticator, AuthResponseError
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/authenticator.py", line 6, in <module>
from openconnect_sso.saml_authenticator import authenticate_in_browser
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/saml_authenticator.py", line 3, in <module>
from openconnect_sso.browser import Browser
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/browser/__init__.py", line 1, in <module>
from .browser import Browser, DisplayMode, Terminated
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/browser/browser.py", line 5, in <module>
from . import webengine_process as web
File "/home/merlijn/.local/lib/python3.9/site-packages/openconnect_sso/browser/webengine_process.py", line 14, in <module>
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineScript, QWebEngineProfile
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

More From » software-installation

 Answers
3

First, you need to install the Qt5 Python dependencies:


sudo apt install python3-pyqt5 python3-pyqt5.qtwebengine vpnc-scripts openconnect

Then you install openconnect-sso using pip


pip install openconnect-sso

Afterwards, you can easily run the app:


$ openconnect-sso -s vpn.example.com --browser-display-mode shown
[info ] Authenticating to VPN endpoint [openconnect_sso.app] address=vpn.example.com name=
[info ] Response received [openconnect_sso.authenticator] id=main message=Please complete the authentication process in the AnyConnect Login window. title=Login
[info ] Browser started [webengine] startup_info=StartupInfo(url='https://vpn.example.com/...', credentials=None)
[info ] Loading page [webengine] url=https://vpn.example.com/...
[info ] Terminate requested. [webengine]
[info ] Exiting browser [webengine]
[info ] Browser exited [openconnect_sso.browser.browser]
[info ] Response received [openconnect_sso.authenticator] id=success message=

[#1393] Tuesday, December 14, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
soahan

Total Points: 230
Total Questions: 123
Total Answers: 123

Location: Maldives
Member since Tue, Dec 21, 2021
2 Years ago
soahan questions
Fri, May 7, 21, 06:17, 3 Years ago
Mon, Jan 16, 23, 05:49, 1 Year ago
Sun, May 7, 23, 10:41, 1 Year ago
;