You are not logged in.

#1 2021-08-03 21:03:21

wnaBee
Member
Registered: 2021-06-19
Posts: 12

[SOLVED]Startx only running root while being installed on non root use

When i configured my latest Arch VM i installed xorg as root, this worked fine until i tried dropping my privileges to a user and run startx. When i did i received the following error:

xauth: timeout in locking authority file /home/sam/.Xauthority

which was then repeated slowly every few seconds until i aborted and received this instead:

(EE)
Fatal server error:
(EE) cannot open log file "/home/sam/.local/share/xorg/Xorg.0.log"
(EE)
(EE)
Please consult the The X.org Foundation support
    at http:wiki.x.org
for help.
(EE)
xinit: giving up
xinit: unable to connect to X serve: connection refused
xinit server error
xauth timeout in locking authority file /home/sam/.Xauthority

Running startx as root works fine and same with sudo (although the latter acts as the former). I erased xorg with pacman -Rsn <packages> before reinstalling it logged in as the user "sam" this changed nothing. I also tried erasing the .Xauthority files but again nothing changed. What advice/suggestions do you have for fixing this issue?

P.S. there is an .xinitrc file in the users home directory if that could be relevant.

Last edited by wnaBee (2021-08-04 17:42:47)


I know nothing.

Offline

#2 2021-08-04 07:00:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,429

Re: [SOLVED]Startx only running root while being installed on non root use

You are not supposed to start X as root, ever. remove the .Xauthority file and then run startx as the normal user

However timeout in locking also reads weird, what's the file system of your home dir?

Last edited by V1del (2021-08-04 07:02:41)

Online

#3 2021-08-04 15:17:13

cmm11
Member
Registered: 2018-02-18
Posts: 40

Re: [SOLVED]Startx only running root while being installed on non root use

Nevermind

Last edited by cmm11 (2021-08-04 15:19:13)

Offline

#4 2021-08-04 17:42:02

wnaBee
Member
Registered: 2021-06-19
Posts: 12

Re: [SOLVED]Startx only running root while being installed on non root use

V1del wrote:

You are not supposed to start X as root, ever. remove the .Xauthority file and then run startx as the normal user

However timeout in locking also reads weird, what's the file system of your home dir?

Thanks for the advice, i was setting up the VM and didn't think about it, won't happen again.

Now. It would seem i have made a severe an continuous lapse of judgement and can be considered to be an idiot. While i was setting up, i had, without giving it a second thought created a directory for the user as root (including the .xinitrc and .bashrc files) because i forgot to do -m while running useradd. I.e. everything in the users directory was owned by root and could only be run by root. Because of that xorg threw a fit since it couldn't access .xinitrc. I solved the issue by creating a new home directory for the user using

sudo mkhomedir_helper <username> 

and creating a new .xinitrc file as the same user. This solved the issue.

My sincerest apologies for making such a rookie mistake, i didn't mean to waste your time. Marking as solved.


I know nothing.

Offline

Board footer

Powered by FluxBB