Score:0

Cannot execute ANY graphical program from terminal

cn flag

First of all this only happens if try to launch applications from the terminal. If i execute startx nautilus from a TTY it's able to nautilus is able to init.

The $DISPLAY env var it's ok, it is set on 0. That seems to not be the problem.

Also i disabled lightdm with sudo systemctl disable lightdm.service, i don't know if that's part of the problem.

I also ran: (Me)$:nautilus --gdk-debug=all --gtk-debug=all --g-fatal-warnings

And got as output:

Gtk-Message: 11:26:56.999: Loading module list: gail:atk-bridge
Gdk-Message: 11:26:57.004: Trying wayland backend
Gdk-Message: 11:26:57.004: opening display 
Gdk-Message: 11:26:57.004: Trying x11 backend
Gdk-Message: 11:26:57.006: Trying broadway backend
Unable to init server: No se pudo conectar: Conexión rehusada
Gdk-Message: 11:26:57.008: Trying wayland backend
Gdk-Message: 11:26:57.008: opening display 
Gdk-Message: 11:26:57.008: Trying x11 backend
Gdk-Message: 11:26:57.008: Trying broadway backend
Unable to init server: Could not connect: Connection refused  
Gtk-Message: 11:26:57.008: Failed to open display (null)
Gdk-Message: 11:26:57.008: Trying wayland backend
Gdk-Message: 11:26:57.009: opening display 
Gdk-Message: 11:26:57.009: Trying x11 backend
Gdk-Message: 11:26:57.009: Trying broadway backend
Unable to init server: Could not connect: Connection refused
Gtk-Message: 11:26:57.009: Failed to separate connection to default display

(nautilus:21043): Gdk-CRITICAL **: 11:26:57.009: gdk_display_get_default_screen: assertion 'GDK_IS_DISPLAY (display)' failed

When i try to launch ANY application happens the same. Examples: microsoft-edge: Unable to open X display.

gedit: (same as nautilus)

gnome-terminal: (also same as nautilus)

wine app: Application tried to create a window, but no driver could be loaded. / Make sure that your X server is running and that $DISPLAY is set correctly.

xterm: Xt error: Can't open display: :1

Pseint: Unable to initialize GTK+, is DISPLAY set properly?

And the list just never ends.

Do you have any idea of why is happening this?

cc flag
Did you enable the connection to your X server (xhost + will do it for everyone, so refine it after you get things working). I think :1 is your DISPLAY, so try that instead of 0.
Lucastegano X avatar
cn flag
@ubfan1 first xhost .+ outputs: xhost: unable to open display "0" And second of all my DISPLAY var is ok, i changed it from 0 to 1 and 1 to 0 and nothing, also it always have been 0 and i didn't have this problem. Also i apologize for the delay of my replay.
cc flag
Looks like 0 might not be your DISPLAY, although that is the 18.04 default. Please post the output of ps auxww |fgrep X Interested in the one with your username and the first arg, mine is ... Xwayland :0 and my $DISPLAY is :-0 20.04 seemed to move to a default of :1 (without Wayland in my case).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.