Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install X on my archlinux home desktop. I get this error when trying to start it (startx/xinit):

[root@computer ~]# startx
xauth: file /root/.Xauthority does not exist
xauth: file /root/.Xauthority does not exist

/usr/bin/X: /usr/lib/libz.so.1: version 'ZLIB_1.2.5.2' not found (required by /usr/lib/libfontenc.so.1)
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

I googled around and asked in #archlinux irc, but couldn't resolve the issue.

share|improve this question

migrated from serverfault.com Mar 9 '12 at 2:32

This question came from our site for professional system and network administrators.

3  
useradd -m -g users -G audio,lp,optical,storage,video,wheel,games,power,scanner -s /bin/bash username cp /etc/skel/.xinitrc ~/.xinitrc create a user and add that user to the default groups and do a startx. don't start x with root. Try if that works. –  user14039 Mar 9 '12 at 3:25

3 Answers 3

up vote 4 down vote accepted

Here's what I'd do: Run ldd /usr/bin/Xorg

You should get a line that looks like this:

libz.so.1 => /usr/lib/libz.so.1 (0xb7357000)

If ldd claims that it can't resolve what file libz.so.1 is in, then uninstall and reinstall zlib:

pacman -R -f zlib 
pacman -S zlib

If ldd can find a specific libz.so.1, then check to see if that file constitutes a broken symbolic link:

ls -l /usr/lib/libz.so.1

(Or whatever ldd told you that libz.so.1 resolves to).

On my Arch boxes, /usr/lib/libz.so.1 is a symbolic link of libz.so.1.2.6 . If /usr/lib/libz.so.1 links to some weird place, like a home directory, track down why - that shouldn't happen.

Ensure that whatever file that ldd resolves libz.so.1 to actually exists, and has contents. I get this:

261 % file libz.so.1.2.6
libz.so.1.2.6: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xb32fb568a025a99ed67220243b487b93ae8ef948, stripped

If the link exists, but the linked-to libz.so.1.2.6 doesn't exist, perhaps you can do the two pacman command sequence above and get everything back. I guess I'd advise against just doing the two pacman commands, until you understand what's going on. Something must have changed, unless this is a new installation, and somehow the zlib package didn't get installed.

share|improve this answer
    
Thank you. That helped me out. –  gits1225 Mar 9 '12 at 23:11

Upon executing startx in the terminal, I got an identical error message. I fixed it bypacman -Sy zlib, which updated the zlib package. That fixed it for me. I'm very new to arch however, so this may not be the best solution.

share|improve this answer

If the zlib thing isn't the issue, this was my problem (expanded based on comment by user14039). Also for security reasons it is much better to run X as a regular user instead of root:

As sudo or root user, run the following (substitute username for your user name):

usermod -a -G audio,lp,optical,storage,video,wheel,games,power,scanner <username>

Now as non-root user:

Copy the skeleton .xinitrc file to your home dir:

cp /etc/skel/.xinitrc ~/.xinitrc

Uncomment or add the startup of the window manager you want to use (I use Gnome):

echo "exec gnome-session" >> ~/.xinitrc
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.