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?