shawnbrown / envlauncher Goto Github PK
View Code? Open in Web Editor NEWLaunch Python virtual environments from the Linux desktop (supports GNOME, KDE, and more).
License: GNU General Public License v3.0
Launch Python virtual environments from the Linux desktop (supports GNOME, KDE, and more).
License: GNU General Public License v3.0
Currently, installing an application with Flatpak doesn't add an executable to the PATH (although Snaps seem to have this sorted out). While there aren't many terminal emulators available on Flathub, it would be good to support Flatpaks in the future.
To check if a specific application is installed via Flatpak:
import subprocess
def flatpak_app_is_available(app_id):
process = subprocess.run(
['flatpak', 'info', app_id],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
return process.returncode == 0
To get a list of all installed Application IDs:
import subprocess
import sys
def get_flatpack_apps():
output = subprocess.check_output([
'flatpak',
'list',
'--app',
'--columns',
'application:f',
])
return [x.decode(sys.stdout.encoding) for x in output.split()]
Some common terminal emulators issue warning messages via stderr
when they are launched. While these are not normally visible when starting EnvLauncher (since it's usually launched via the application icon), it might be desirable to suppress these warnings when they are issued erroneously.
Some frequently seen warning messages...
b"Display does not support owner-change; copy/paste will be broken!\n"
The above warning is erroneously issued when running gnome-terminal
versions 3.40.1 and earlier with Wayland--it can be ignored without issue. Internally, gnome-terminal
makes a call to the function gdk_display_supports_selection_notification()
but this only works with X11 (not Wayland). The issue was fixed in gnome-terminal
version 3.40.2.
b"Failed to register: Unable to acquire bus name 'com.github.shawnbrown.EnvLauncher'\n"
In gnome-terminal
version 3.38.1 (and possibly in 3.38.2) and earlier, the --app-id
command line option tries to register the D-Bus name every time it's used. But after the name has been registered once, the following error message is displayed on each additional attempt. This issue seems to be fixed in gnome-terminal
version 3.38.3.
It may be best to let these warnings go to stderr
--if that's the case, this issue can be closed without further changes.
Some users might like to have new environments automatically added to their EnvLauncher icon's context menu.
I'm filing this issue because I think it's natural for a user to request something like this but there are limits to how it can be implemented. Desktop environments are not consistent in how they refresh application icon updates while a session is running and an implementation that provides inconsistent results is not going to be satisfying.
I think that a decent compromise would be to create a service that scans for new environments when a session starts (with a systemd unit). If there is interest for something like this, I'm open to exploring a solution in the future but it's not going to be part of a 1.0 release.
pip
as well as common package managers (via rpm
and deb
archives).utilities-terminal
icon of popular distro themes (hicolor, Yaru, Mint-Y, etc.).A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.