Can't launch graphical apps from terminal after updating to 15.10

As a regular user, run the command xhost +. After that, try running your graphical application again.

This turns off host-based access control on the X server. Here is the relevant information from the man page:

The xhost program is used to add and delete host names or user names to the list allowed to make connections to the X server.

+ Access is granted to everyone, even if they aren't on the list (i.e., access control is turned off).


Odd but export DISPLAY=:1 helped. Cheers.


Warning: Improper use of xhost can inadvertently give every host on the Internet full access to an X display server.

Generally you shouldn't turn off host-based access control on the X server unless you know what you're doing. Instead you should only allow the things that require access.

Solution:

Execute: xhost +si:localhost:root

The above solution also works for Wayland users executing an elevated XWayland application.

When attempting to run an XWayland application with elevated permissions you may receive the following error:

No protocol specified
Unable to init server: Could not connect: Connection refused
Could not parse arguments: Cannot open display: