Sooo, that's the thing, for some reason now i cannot open graphical applications from the terminal, something that is curious to me is that i can launch gedit(for example) form my keyboard shortcut (i got it like Ctrl + Alt + G), but from the terminal i got this error: Unable to init server: Could not connect: Conection refused
(gedit:6690): Gtk-WARNING **: 22:38:15.851: cannot open display: 1
I tryed something that i got from internet: xhost + this is for (if i undertood it well) for allow all the applications to start a grapical server, but it outputs: xhost: unable to open display "1"
i don't know why i'm getting this error because an hour ago i could launch graphic applications from the terminal. soo any help is apreciated :)
PD: this error happens with all the applications that i tryed to launch from the terminal
2 Answers
It's usually DISPLAY=:0 instead of DISPLAY=:1 so run the following command to see if this is the problem.
DISPLAY=:0 geditIf that works, you can make this somewhat permanent by running the following command:
export DISPLAY=:0After exporting the correct DISPLAY variable, you can launch graphical applications from the terminal normally:
gedit 1 I found the problem, the problem is that i disabled my display manager (lightdm)because it doesn't allow me to log in(log in loop) and i thought that it was it's only function.
But when i reconfigured lightdm again i could launch gedit from the terminal without problems, so tecnically i did solve my problem but now i got other problem, is that when ubuntu boots how to directly show the console log in instead of the graphical log in.
But i'll try to solve it later...
Thank you anyways @mchid :)
1