Am running NixOs. A couple of days ago I performed a channel update into a system upgrade.
Had some regular upkeep things I needed to perform after an upgrade, but nothing too serious, apart from the qutebrowser package.
Qutebrowser is a browser written in Python, based on the QT ecosystem.
The issue is that qutebrowser fails to start up with a: ‘Could not initialize GLX’, which as far as I was willing to track - comes from the QT libraries. I’ve seen some topics on the issue, one even in nixos context - but it seemed to be resolved with time and updates from the conversation.
The error itself seems to be a highly generic QT error too.
The fun part though, is that by running a nix-shell with qutebrowser as a dependency:
nix-shell -p qutebrowser
It works without problem. Now, My guess is that something in my configuration, or system state has gone wrong. But I’ve spent most of My ideas on where to look next.
The issue is of no urgency, as My workflow easily allows Me to wrap My invocations with nix-shell, but I spent some time before even finding that it even works with nix shell, and now am curious as to where the problem comes from in the first place.
As a note, something that went differently from usual upgrades - this time I ran out of hard drive space during the upgrade and performed a nix garbage collection - followed by another attempt at upgrade.
I’m not sure what’s causing the error or how to fix it, but here’s why you’re getting a different result when you use nix-shell (probably). When you do a system update, you’re using whatever channel root is set to use, and when you run nix-shell you’re using whetever channel the logged-in user is set to use. You can check what those channels are by running
sudo nix-channel --list
In any case, since nix-shell works for you, you can do
nix-env -iA nixpgks.qutebrowser
and that should get you the working version without having to use
nix-shell in future.
Didn’t know channels were user based.
Also completely forgot about the nix-env approach.
I had installed a third-party channel while trying to fix the GL issue, but was oblivious to the fact that I had installed it only for My local user. (Lets see how the next bigger update works out).
For future reference, if anyone arrives here - this is the channel I used:
I have not fully explored what the channel does in its entirety - so I can’t produce an educated recommendation for it, just that it did seem to help out with running qutebrowser.
I am running qutebrowser on nixpkgs-unstable, and it works just fine out of the box.
One idea that comes to my mind: maybe your executable was local, and not in the nix store (so library dependencies were missing)? Also, QT applications need to be wrapped so that the environment variables are set properly. Maybe you ran the unwrapped version?
I remembered having played around with overriding it some time ago, but even with removing all that, still had no luck.
Then I thought about what You said, and went down the invoke path, and there it was:
$ which qutebrowser
And that one points to a version 2.1.1 (current actual version is 2.3.1, can definitely see a version mismatch for QT libs).
Now I’ll have to figure out what I did to push it into the default profile, and what a default profile is
Whelp, that was simple. Seems I was playing around with root nix-env too much.