Missing X server or $DISPLAY

I am running ubuntu 20.04 LTS with vncserver. I get into it with a ssh tunnel using vnc viewer.

I have X11 installed. GUI apps like xdm, xclock, and visual studio code work with no issues. But when I run postman I get the below error. Can anyone help, please?

one@work ~
% postman                      
The disableGPU setting is set to undefined
Not disabling GPU
No protocol specified
[397738:0301/143717.046713:ERROR:ozone_platform_x11.cc(248)] Missing X server or $DISPLAY
[397738:0301/143717.046768:ERROR:env.cc(225)] The platform failed to initialize.  Exiting.
The futex facility returned an unexpected error code.zsh: abort (core dumped)  postman
%  strace -e %net postman
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=397171, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
connect(5, {sa_family=AF_UNIX, sun_path="/run/user/1000/bus"}, 21) = 0
getsockname(5, {sa_family=AF_UNIX}, [112->2]) = 0
getpeername(5, {sa_family=AF_UNIX, sun_path="/run/user/1000/bus"}, [112->21]) = 0
sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0", iov_len=1}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=397158, uid=1000, gid=1000}}], msg_controllen=32, msg_flags=0}, 0) = 1
The disableGPU setting is set to undefined
Not disabling GPU
No protocol specified
[397158:0301/142848.323330:ERROR:ozone_platform_x11.cc(248)] Missing X server or $DISPLAY
[397158:0301/142848.323393:ERROR:env.cc(225)] The platform failed to initialize.  Exiting.
The futex facility returned an unexpected error code.+++ killed by SIGABRT (core dumped) +++
zsh: abort (core dumped)  strace -e %net postman

Bump on this, please

Same issue here running on wsl2 on Windows 10.

$ postman
The disableGPU setting is set to undefined
Not disabling GPU
[1826:0426/085104.003259:ERROR:ozone_platform_x11.cc(248)] Missing X server or $DISPLAY
[1826:0426/085104.003305:ERROR:env.cc(225)] The platform failed to initialize. Exiting.
[0426/085104.004043:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
Segmentation fault

~$ echo $DISPLAY
:0

$ strace -e %net /snap/bin/postman
— SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1647, si_uid=1000} —
— SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1658, si_uid=1000, si_status=0, si_utime=0, si_stime=0} —
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
connect(5, {sa_family=AF_UNIX, sun_path=“/var/run/nscd/socket”}, 110) = 0
sendto(5, “\2\0\0\0\v\0\0\0\7\0\0\0passwd\0”, 19, MSG_NOSIGNAL, NULL, 0) = 19
recvmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=“passwd\0”, iov_len=7}, {iov_base=“\310O\3\0\0\0\0\0”, iov_len=8}], msg_iovlen=2, msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[6]}], msg_controllen=20, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 15
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
connect(5, {sa_family=AF_UNIX, sun_path=“/run/user/1000/bus”}, 21) = 0
getsockname(5, {sa_family=AF_UNIX}, [112 => 2]) = 0
getpeername(5, {sa_family=AF_UNIX, sun_path=“/run/user/1000/bus”}, [112 => 21]) = 0
sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=“\0”, iov_len=1}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=1647, uid=1000, gid=1000}}], msg_controllen=32, msg_flags=0}, 0) = 1
The disableGPU setting is set to undefined
Not disabling GPU
[1647:0426/084904.278742:ERROR:ozone_platform_x11.cc(248)] Missing X server or $DISPLAY
[1647:0426/084904.278803:ERROR:env.cc(225)] The platform failed to initialize. Exiting.
[0426/084904.279646:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
+++ killed by SIGSEGV +++
Segmentation fault

Run in terminal

xhost local:

then

postman

Worked for me, I hope it will work for you too.

1 Like

This worked great, thank you! This made things so much easier than the workaround I had to do.