# Error (no authorization protocol specified) when trying to open Firefox/Chromium



## Tracker (Dec 22, 2022)

When I try to open Chromium or Firefox, on a newly installed machine, I get the error:

`Authorization required, but no authorization protocol specified`

How does one fix this and why is it happening?


----------



## zirias@ (Dec 22, 2022)

Run it

From within your X session (you do have one running, right?)
As the same user running this X session.


----------



## Tracker (Dec 22, 2022)

zirias@ said:


> Run it
> 
> From within your X session (you do have one running, right?)
> As the same user running this X session.


I was trying to reinstall xmonad after copying backup files. I restarted and now it seems to be working. Not sure I understood what happened but working now.


----------



## zirias@ (Dec 22, 2022)

Tracker said:


> Not sure I understood what happened


The X server, when configured normally, expects X clients (anything that wants to display something like a window) to authenticate. Anything relevant for that is normally stored in an .Xauthority file, only readable by the user running the X session. The location of the file is expected in the `XAUTHORITY` environment variable. You can list the contents with `xauth list`.

Starting some X client if you're missing the `XAUTHORITY` variable or don't have access to the file it points to will therefore never work (unless you switch your X server to allow everything, e.g. with `xhost +`, but don't do that ...).


----------

