Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Cannot open display "default display" (Read 8118 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Cannot open display "default display"

I seem to be having some sort of issue with not being able to launch lightdm or the correct display. At every boot Im greeted with login (tty1) with error
Code: [Select]
xset: unable to open display ""
Cannot open display "default display"

The only thing I can do to temporarily bypass this is to manually launch lightdm itself;
Code: [Select]
sudo lightdm
and It would immediately bring me to the greeter.

I have no idea what could have caused this and no recollection of what I did before this happened. I've done some digging trying to find a solution to this problem but I can't seem to get it fixed.

If anyone could help, I'd appreciate it very much :'(

Re: Cannot open display "default display"

Reply #1
What happens if you try to manually launch lightdm with the appropriate openrc command?

 

Re: Cannot open display "default display"

Reply #2
Also check if elogind is started/enabled



Re: Cannot open display "default display"

Reply #5
Sorry but Im not sure what you mean by "appropriate openrc command"

Sorry I didn't remember the openrc command off the top of my head. I meant what happens if you do "rc-service lightdm restart"?

Re: Cannot open display "default display"

Reply #6
Sorry I didn't remember the openrc command off the top of my head. I meant what happens if you do "rc-service lightdm restart"?
Somehow I'm getting
Code: [Select]
* rc-service: service `lightdm' does not exist

Re: Cannot open display "default display"

Reply #7
Oh my mistake, you're probably using xdm on openrc. Try "rc-service xdm restart".

Re: Cannot open display "default display"

Reply #8
Oh my mistake, you're probably using xdm on openrc. Try "rc-service xdm restart".
After running "rc-service xdm restart" I managed to uncover the root cause of the issue. Apparently there was a line in my /etc/profile which auto runs my .zshenv and .zprofile but was not directed to the correct path to where the 2 files are located. I think it's because I installed zsh and set zsh as my default shell and I might have moved my zshenv. I corrected the the path and now xdm manages to run lightdm correctly at boot.

Thanks 😊