python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.29k stars 582 forks source link

Make Eel work with Microsoft Edge on Linux #681

Open thatfloflo opened 1 year ago

thatfloflo commented 1 year ago

Microsoft Edge is available for Linux, at least from the Insider Channel -- see Debian package downloads and instructions.

This PR implements the general detection mode using whichcraft.which to find microsoft-edge on Linux. The primary Edge example has been updated to reflect this, with a fallback to Chrome if Edge is not detected. The README.md has also been updated so the wording is more general and admits the option of using Edge on Linux.

The primary use case I see is enabling greater consistency of behaviour across platforms, especially if #612 and/or #663 are pulled in.

The PR has been written in such a way that it should be readily compatible with @properchopsticks' PR #612 which adds the start msedge --app option and @doug-benn's PR #663 which aims to enable app mode for Edge based on finding the executable path on Windows, regardless of which of the these PRs is integrated first. I think they'd probably all three go well together to comprehensively cover the different ways Edge might be launched, as appropriate to the system configuration.

Tested on Ubuntu 22.04 with Microsoft Edge 112.0.1722.23 beta and Windows 11 22H2 with Microsoft Edge 111.0.1661.54. Also works with Ubuntu in WSL2 for me if --disable-gpu is passed as an additional command line argument.