Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use display because xauth not working after setupTermuxArch r refresh #241

Closed
petkar opened this issue Aug 1, 2020 · 5 comments
Closed

Comments

@petkar
Copy link

petkar commented Aug 1, 2020

This should give some insight #228 (comment)
I'll expand it here :

xauth:  error in locking authority file /home/realzink/.Xauthority
Could not start Xvnc.

(EE)
Fatal server error:
(EE) Can't read lock file /tmp/.X2-lock

(EE)/usr/lib/Xorg.wrap: Only console users are allowed to run the X server

I refreshed my install to keep up with the updates(on the previous installation). After many hours of looking up and checking conflicting packages/configs, I wasn't able to resolve it so I decided to go for the reinstallation.
Now, on this installation, the issue reappeared after refreshing and it was clear that it was the refresh which was causing this issue.
Note that this does not affect the root user (which is why I was able to check if Firefox ran).
It only affected the standard user (Also, I'm able to install aur packages right after copying makepkg.diff because fakeroot was working. Great work!).
Then I tried again after creating a new user with addauser but get the same errors in it again.

[root10:29TermuxArch]$ addauser petkar
cp: cannot open '/root/.l2s..ICEauthority-n0001' for reading: Too many levels of symbolic links
cp: missing file operand
Try 'cp --help' for more information.

 TermuxArch WARNING:  Generated script signal 1 near or at line number 56 by !

addauser  2.0.118 [Exit Signal 201]: DONE
[root10:41TermuxArch]$ q
> startarch l petkar
[petkar10:33~]$ vncserver :3
xauth:  error in locking authority file /home/petkar/.Xauthority
Could not start Xvnc.

(EE)
Fatal server error:
(EE) Can't read lock file /tmp/.X3-lock

Assuming that it might be a problem with copying configs and desperate to keep the installation, I proceeded to create a user with the useradd command.
Unfortunately, I got the same error on it too (xauth: error in locking authority file /home/deepit/.Xauthority).
I don't want to reinstall arch again because setting up packages and my personal configurations take a lot of time. Any idea how I can fix this?
This isn't an issue with vnc but xauth itself. keys or pci doesn't work in users anymore either.
A temporary work around to this issue is logging in using startarch c su user instead of startarch l user.
I thought this was due to zsh not loading .profile and .bashrc but it didn't fix it either.

After some searching, I figured that copying from root profile to user home profile messed up owners (even though It did show the user)
Running these commands successfully fixed the issue :

GID=$(id -g)
startarch c "usermod -u $UID USER"
startarch c "groupmod -g $GID USER"
startaarch c "chown -R USER:USER /home/USER"

Lets discuss the consequences of this fix.

@petkar
Copy link
Author

petkar commented Aug 1, 2020

This TermuxArch/TermuxArch#9 should probably fix the issue. After making all the files in the home directory of the user it's respective owner, xorg and xauth began to work flawlessly again.

@petkar
Copy link
Author

petkar commented Aug 2, 2020

Thanks! It's fixed now. Another very important thing to note is that the --link2symlink option must be enabled for user accounts for this to work. Why is it disabled for user accounts by default?

@petkar petkar closed this as completed Aug 2, 2020
@SDRausty
Copy link
Owner

SDRausty commented Aug 3, 2020

Why is it disabled for user accounts by default?

Please see Sudo is non functional #4

Variable substitution in TermuxArch resolves sudo. Variable assignment PROOTSTMNTU="${PROOTSTMNT//--link2symlink }" drops --link2symlink from the user login proot statement. The option is necessary for root user to function properly.

@petkar
Copy link
Author

petkar commented Aug 4, 2020

I guess it can safely be considered necessary as disabling it breaks a lot of things.

@SDRausty
Copy link
Owner

SDRausty commented Sep 5, 2020

can safely be considered necessary

used to resolve:

Please see Sudo is non functional #4

It is amazing how this project is flux. Upstream and downstream and within the projects itself changes that at present seem to have this project working as expected; Thank you once again🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants