Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] xinit: unable to connect to xserver
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Sun Oct 08, 2023 11:20 am    Post subject: [SOLVED] xinit: unable to connect to xserver Reply with quote

If I want to log into my normal user and do startx, I have to type doas before it first.

But I want to login on the TTY screen and then automatically startx after that.

I added this to my .zshrc

Code:
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
startx
fi


Unfortunately, it fails right after logging it because (permission denied).

Obviously I could type there doas before it but it's pretty annoying to write a password twice everytime I boot up the laptop.

Here's the log file

Does anybody know how to fix this? :roll:

P.S: Login managers are bloat.
_________________
Illegitimi non carborundum.


Last edited by Torpus on Sun Oct 08, 2023 6:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3961

PostPosted: Sun Oct 08, 2023 11:30 am    Post subject: Reply with quote

Either use elogind or build xorg-server with USE="suid".
Plz see
https://wiki.gentoo.org/wiki/Non_root_Xorg
_________________
:)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55457
Location: 56N 3W

PostPosted: Sun Oct 08, 2023 12:14 pm    Post subject: Reply with quote

Torpus,

It was an upstream design decision several years ago to drop the default building Xorg as suid.

Xorg needs root access for some of the setup, so you need suid or a 'helper' that has root access.
Naturally, the helpers add a layer of complexity ... and they have root access.

Pick the least worst. Keep in mind the KISS principle
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Sun Oct 08, 2023 6:02 pm    Post subject: Reply with quote

alamahant,

Adding elogind to OpenRC was enough. It's working now :)
_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum