0

I have instaled the Ubunto 22.04 in a Google instance and have also instaled VSCODE using SNAP.

I had no problem with instalation, but when I try to open VSCODE I'm receiving this error :

Authorization required, but no authorization protocol specified
[1301:1220/185049.512682:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[1301:1220/185049.512752:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.

I'll thank for some guidance of how to fix this.

Tks.

stumblebee
  • 3,547
  • You need a desktop to run vscode. You should install vscode on your personal system and then set up a ssh private key. – Rinzwind Dec 20 '23 at 19:53
  • Additional information : If I run CODE using SUDO (sudo code --no-sandbox --user-data-dir="~/.vscode-root") it work fine, so this issue is a mater of lack of authority. So How can I identify where this authority is missing.? – Eduardo Dec 20 '23 at 20:34

1 Answers1

0

Sorry I cannot add a comment so have to add this as an answer: But I am getting the exact same problem.

The issue does not appear to be about permission though. I am able to run vscode from a command line just fine as my normal user. But when I switch to root and try to do the same that is when I get this error.

Authorization required, but no authorization protocol specified

[4827:0115/081942.759486:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY [4827:0115/081942.759530:ERROR:env.cc(255)] The platform failed to initialize. Exiting. The futex facility returned an unexpected error code. zsh: IOT instruction code-oss

I am assuming it has something to do with a missing step in the .bashrc or .zshrc setup. But I tried setting the DISPLAY env to match that of my normal user and it didnt help.

Alturis
  • 1
  • 1