Failed to open display=:0 on tx2

Hi All,

I replaced username and hostname to something else. now I am getting “failed to open display=:0” when I run a GUI application. I tried adding adding cookies to the already created Xauthority file for the previous user. but it didn’t work. can anybody suggest any other ways to fix it?


Are you starting a remote application on a Jetson while logged in to a PC? Or are you starting from a different user on the same Jetson? Many details of how you are logging in and connecting are required.

FYI, the “DISPLAY”, in the syntax “DISPLAY=:0”, only works on the local computer. Once a remote computer is referenced things change. However, which end is remote versus local might get a bit confusing. Failing to use “DISPLAY=:0” can be either because the display was not opened on the system this refers to, or it can be because of security. Hard to tell without complete details.

You may try to add your new user to video group:

sudo usermod the_new_user_name -a -G video

Hi linuxdev,

The application is built locally on tx2 and it uses x server. I am setting DISPLAY=:0.

I replaced username nvidia and home folder with a new user and I am running this application from the new user.


When you are actually logged in to the GUI from the user who runs the program, what do you see from:


Is this “:0”? If it is something else, e.g., “:1”, then you would need to use that instead for running the program. For example, if the program were “xterm”, with “:1”, then at your login to the same user name, the program launch would be either of:

DISPLAY=:1 xterm
# OR:
export DISPLAY=:1

Note that if you use ssh for remote login, then you should be sure to not use the “-X” or “-Y” options for forwarding.

1 Like

Hi linuxdev,

I am logging through ssh without X forwarding and I am exporting DISPLAY=:0. if I do “echo $DISPLAY” it returns :0.


Is it correct that this is what the echo says from the running local GUI? If you export “:0”, then it will always echo that, but my goal is to know for certain that the logged in GUI also says “:0”.

So just as a sanity check list, here are some things to look at:

  • The person logging in to the GUI must be the same person the ssh logs in as.
  • The ssh export of DISPLAY should be the same as the echo of "$DISPLAY" at the GUI.
  • @Honey_Patouceul mentioned group membership. If the person logged in to the GUI is not a member of the "video" group, then the application will still not be able to run in a number of circumstances. As a test, if your user name happens to be "nvidia", then you could see if your user is a member of video via this:
    # Your user name, "nvidia" for example, should appear in the reported "video" line:
    grep video /etc/group

    If this fails, then the reply from @Honey_Patouceul would remedy this.

  • Verify that the same user in the same GUI can run the application directly.

Please note that if you changed a user account name, and did not use the correct tools, then probably the secondary groups would not have correctly changed. As a result the new name would no longer be a member of the same secondary groups.