Env = LIBGL_ALWAYS_SOFTWARE, 1 in lua config

env = LIBGL_ALWAYS_SOFTWARE, 1

I used to use this line in my hyprland.conf file so that hyprland would work properly in my vm but now that the hyprland config switched to lua, I cannot get this working.

I tried this:

hl.env(“LIBGL_ALWAYS_SOFTWARE”, “1”)

but it doesn’t work.

I also know I can just force software in /etc/environment and that works but for the sake of learning how things are done in lua, I was wondering if someone can help me get this line working directly in the hyprland.lua config file.

Maybe changing it to hl.env(“LIBGL_ALWAYS_SOFTWARE”, true) will work, although I’ve never had to do that with any other boolean env.

I had a typo in my lua code, instead of hl.env I was writing h1.env

That was causing the issue, the following code works now

hl.env(“LIBGL_ALWAYS_SOFTWARE”, “1”)