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

feature request: freebsd12 support #25

Open
larham opened this issue Jul 7, 2022 · 7 comments
Open

feature request: freebsd12 support #25

larham opened this issue Jul 7, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@larham
Copy link

larham commented Jul 7, 2022

attempting to run python with selenium + webdriver-setup (for chrome or firefox) on a shared server at a hosting provider (pair.com)

2022-07-06 23:47:24,133 INFO 'freebsd12' is currently not supported. Please open an issue or a PR at 'https://github.com/roniemartinez/browsers'

browser = get_webdriver_for("firefox", options=options)
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_setup-1.1.0-py3.7.egg/webdriver_setup/get_webdriver.py", line 22, in get_webdriver_for
driver = FirefoxDriver(**kwargs)
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_setup-1.1.0-py3.7.egg/webdriver_setup/firefox.py", line 11, in __init__
super().__init__(**kwargs)
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_setup-1.1.0-py3.7.egg/webdriver_setup/driver.py", line 6, in __init__
self.driver = self.create_driver(**kwargs)
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_setup-1.1.0-py3.7.egg/webdriver_setup/firefox.py", line 24, in create_driver
driver_path = GeckoDriverManager(cache_valid_range=cache_timeout).install()
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_manager-3.8.0-py3.7.egg/webdriver_manager/firefox.py", line 36, in install
driver_path = self._get_driver_path(self.driver)
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_manager-3.8.0-py3.7.egg/webdriver_manager/core/manager.py", line 29, in _get_driver_path
binary_path = self.driver_cache.find_driver(driver)
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_manager-3.8.0-py3.7.egg/webdriver_manager/core/driver_cache.py", line 95, in find_driver
driver_version = driver.get_version()
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_manager-3.8.0-py3.7.egg/webdriver_manager/core/driver.py", line 44, in get_version
if self._version == "latest"
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_manager-3.8.0-py3.7.egg/webdriver_manager/drivers/firefox.py", line 29, in get_latest_release_version
self.browser_version = get_browser_version_from_os("firefox")
File "github/losebot/.venv/lib/python3.7/site-packages/webdriver_manager-3.8.0-py3.7.egg/webdriver_manager/core/utils.py", line 200, in get_browser_version_from_os
}[browser_type][os_name()]
@roniemartinez
Copy link
Owner

Thanks for opening an issue. I have not worked on FreeBSD but are Desktop Entries (.desktop) supported?

@larham
Copy link
Author

larham commented Jul 7, 2022

I found a document about a tool for installing .desktop on freebsd Is that related?

@roniemartinez
Copy link
Owner

roniemartinez commented Jul 7, 2022

What I mean is that if FreeBSD uses the same method as Linux does?

In Linux, whenever you install an application, it creates a .desktop file (e.g. firefox.desktop) which contains the app information including where the executables are located. This only applies to desktop Linux.

LINUX_DESKTOP_ENTRY_LIST = (
# desktop entry name can be "firefox.desktop" or "firefox_firefox.desktop"
("chrome", ("google-chrome",)),

@larham
Copy link
Author

larham commented Jul 7, 2022

Sorry, I'm ignorant of desktop mode on both linux and freebsd.

Is there a small investigative step I can perform to help you understand the answer to your question?

@roniemartinez
Copy link
Owner

That's alright. Can you check if any of these directories contain .desktop files?

# $XDG_DATA_HOME and $XDG_DATA_DIRS are not always set
XDG_DATA_LOCATIONS = (
"~/.local/share/applications",
"/usr/share/applications",
"/var/lib/snapd/desktop/applications",
)

@larham
Copy link
Author

larham commented Jul 7, 2022

apparently not:

ls: ~/.local/share/applications: No such file or directory
ls: /usr/share/applications: No such file or directory
ls: /var/lib/snapd/desktop/applications: No such file or directory

as a shared server at a hosting company, I'd expect server-only style, headless executables

@roniemartinez
Copy link
Owner

Thanks! I will have to try FreeBSD to add support.

@roniemartinez roniemartinez added the enhancement New feature or request label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants