Workaround for when poetry cannot find pyenv managed python
Sander @
I use pyenv to manage python versions for my projects, and use poetry to manage project dependencies. Poetry was unable to find the latest python version, and insisted on creating virtual envs with system python.
Setting poetry config virtualenvs.prefer-active-python true did not work for me, and neither did poetry env use whatever-version:
$ poetry env use 3.11
Could not find the python executable python3.11
However pyenv can list the the full path to the currently active python, which can be used as a parameter to poetry, so the following worked:
$ poetry env use $(pyenv which python)
$ poetry install; poetry run python --version
Update: double check that pyenv is configuring the shell correctly -- $HOME/.pyenv/shims should be in your PATH variable, and your shell runtime configuration file (such as .bashrc / .zshrc) should contain eval "$(pyenv init -)"
I upgraded one of my personal Ubuntu servers yesterday and with the knowledge of a good daily backup I knew I didn't have to prepare and see what I would encounter. This particular server has upgraded twice before, so has some custom and legacy configuration. After the third try I was successful and I wanted to share the following tips that helped me smooth out the upgrade process.
Clean up apt sources
The upgrade process will disable all third-party sources from your system to avoid complications updating system software, so it is helpful to be able to list all disabled sources. To aid in this I found it helpful to clear out the apt sources files before the upgrade my self.
In particular, in preparation of the upgrade, I removed .distUpgrade and .save files created by previous upgrades. I then removed all commented lines from the remaining source files starting with # deb, then deleted any 0 byte files which have no content: find . -type f -size 0c -delete.
This made it obvious what files had changed and what those changes are, that I needed to review. Typically by running find . -name "*.list" -exec sed -i 's/jammy/noble/g' {} \; after the upgrade was complete.
Update custom apt sources / PPAs before upgrading
It turns out I had Nginx and MariaDB installed pinned to a particular version that was no longer supported on the target Ubuntu Server version, this caused one upgrade to install the system versions which were incompatible with my configuration. On a second go, I first upgraded the software to the latest supported version for my legacy Ubuntu version, which updated the apt sources to something that was better supported.
Set DNS servers
Somewhere Ubuntu switched to systemd DNS management and I hadn't run sudo nano /etc/systemd/resolved.conf and set a DNS server, resulting in not being able to resolve any domains after the upgrade. I was able to set and verify the ResolveD configuration before the upgrade as the system service was already installed. After this, I encountered no issues.
Ubuntu's minimal installation appears to be the standard installation plus the removal of some packages! That's unexpected as I was trying to save installation time. #ubuntu#technology#linux
Vertical dock on elementaryOS 8…
I prefer my dock on the left side of the screen and the new elementaryOS 8 Wayland compatible dock's design is to explicitly not support that. This is because the dock is visible in the workspace switcher and allows the user to drag windows to other workspaces using the dock.
If you're happy to lose that functionality and are using the Classic login session then you can reinstate Plank as follows:
So I use ElementaryOS and in version 7 you are no longer able to map just the Eject key. I like to map this to the Multitasking View (something like the macOS Expose).
Setting up Bonjour / Zero configuration networking using #OpenSUSE Tumbleweed is a little bit more involved than with some other #linux distros such as Ubuntu. It consists of setting up the avahi service, followed by configuring the firewall.
Avahi is a free zero-configuration networking implementation, including a system for multicast DNS and DNS Service Discovery.
However I noticed that I still couldn't ping any other devices on the network. This is because the default firewall blocks unconfigured services, which makes sense from a security point of view.
For this we start Yast Firewall
YaST Firewall is a configuration tool in openSUSE and SUSE Linux that allows users to manage firewall settings, including opening ports and defining security zones. It has transitioned to using firewalld as the default firewall management system, which provides a more user-friendly interface for configuring network security.
Step 1: List Networking Interfaces
To begin configuring your firewall, you first need to identify the network interface you wish to work with. Run the following command in the terminal:
ip link show
This command will display a list of all available network interfaces on your system. Look for the interface name associated with your active network connection; it may look something like wlp3s0 or eth0. Make a note of the correct interface name, as you’ll need it in the subsequent steps to configure the firewall settings effectively.
Step 2: Configuring the firewall
Open YaST Firewall, under Interfaces, click custom, then select a zone such as home if you're on a home network, and under Interfaces: type the networking interface name from step 1.
Then check that under the networking zone mdns is listed under the allowed column. Accept the configuration changes.
You should now be able to ping your other devices!
I'm testing a fully local, Linux-native meeting minutes pipeline that replaces tools like AI meeting notetakers with a privacy-preserving, scriptable workflow. Unlike some other options the control is with the user and no information leaves the local machine. #linux
ElementaryOS 7 to 8 upgrade notes…
Although it's not supported I used this guide to semi automatically upgrade my daily driver.
You'll want to create a restore point with Timeshift, and ideally a system image using CloneZilla, because stuff is likely to break. I also backup my home directory with Back In Time and have a sync app for certain files within that.
I first created two Virtual Machines for eOS7 and eOS8 and then compared the eOS7 system after it was upgraded to 8 with a vanilla eOS8 setup, before I was confident enough to go ahead.
Apt sources compatibility
The main culprit as usual were third-party apt sources. In particular, if you have this hardware, I recommend to remove the AMD GPU drivers completely and reinstall them after the upgrade, to avoid kernel compilation issues.
Applications
I also lost a few applications (HeyNote and Albert), but their preferences were still there so simply reinstalling them made them work again.
Heynote's AppImage would no longer start:
./Heynote.AppImage [35483:0919/135315.749882:FATAL:sandbox/linux/suid/client/setuid_sandbox_host.cc:169] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_Heynot9r0j9T/chrome-sandbox is owned by root and has mode 4755
I fixed this by installing the HeyNote snap version.
Albert could not be found (not sure why but the executable was no longer on the system) and I installed the OBS version from their website which setup a new apt sources file.
backintime-qt was gone, a simple apt install restored it.
Other issues
My custom keyboard shortcuts are still running but they are no longer visible. I have a bunch migrated over from /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1-custom7 but they are not showing in the Custom shortcut settings anytime, as these are now stored at /io/elementary/settings-daemon/applications/application-shortcuts. It's possible to dump them by restoring the dconf database to a test-user and then using dconf dump with some parameters.
I use an app called Input Remapper to map my option and command keys (long story) and this stopped working after the upgrade, despite the app saying the mapping is in effect. I'll try and recreate it and see if there's an update for it.
That's it, relatively smooth for an unsupported setup.
x86 games, like Championship Manager 01/02, might not install on this OS which cannot install wine32 due to system conflicts. This means apps like Bottles (Wine wrapper) cannot select a working Wine version.
To get around this, install the PlayOnLinux flatpak, which has an option to change the current Wine version. This will let you pick x86 versions, which install wine32 inside the flatpak. After which the installer will run.
If you get prompted to insert the CD use this trick to copy the the files into a virtual CDROM
Tried 1Password for SSH keys and Git management (keys in 1Password, authentication via agent + desktop prompt before access, and 1Password must be running) and not a fan of more red tape around the SSH keys. Non-interactive processes just fail to use the key first-time round, so I ended up having to commonly do operations twice. Easy restore from a BackInTime backup. #security#linux