Artix Linux Forum

Init systems => OpenRC => Topic started by: Zukkii on 03 July 2020, 18:10:23

Title: [SOLVED] Cannot open display "default display"
Post by: Zukkii on 03 July 2020, 18:10:23
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 :'(
Title: Re: Cannot open display "default display"
Post by: Dudemanguy on 03 July 2020, 19:12:13
What happens if you try to manually launch lightdm with the appropriate openrc command?
Title: Re: Cannot open display "default display"
Post by: ndowens on 03 July 2020, 23:32:56
Also check if elogind is started/enabled
Title: Re: Cannot open display "default display"
Post by: Zukkii on 04 July 2020, 00:54:57
What happens if you try to manually launch lightdm with the appropriate openrc command?

Sorry but Im not sure what you mean by "appropriate openrc command"
Title: Re: Cannot open display "default display"
Post by: Zukkii on 04 July 2020, 00:59:14
Also check if elogind is started/enabled

Yes I can confirm elogind is started/enabled
Title: Re: Cannot open display "default display"
Post by: Dudemanguy on 04 July 2020, 01:12:36
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"?
Title: Re: Cannot open display "default display"
Post by: Zukkii on 04 July 2020, 01:50:12
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
Title: Re: Cannot open display "default display"
Post by: Dudemanguy on 04 July 2020, 02:08:38
Oh my mistake, you're probably using xdm on openrc. Try "rc-service xdm restart".
Title: Re: Cannot open display "default display"
Post by: Zukkii on 04 July 2020, 04:07:55
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 😊