Solution to "X Error of failed request: GLXBadFBConfig" on newer WINE versions (Scrivener 3)

If you’re using WINE v6.6 and Scrivener 3 won’t start, and you get the error message

X Error of failed request:  GLXBadFBConfig

(among other messages) in the terminal when you run “wine ./Scrivener.exe” or whatever, then running the command


will fix it temporarily, but for a more durable fix, add


to the to the file ~/.pam_environment (create if does not exist), log out, and log back in again.

Thanks to for the solution. I encountered the issue because I’m running WINE 6.6 on a rolling-release distro, but others may encounter this issue soon when their distribution updates its wine package.