7

I ran the Software Manager and now startx doesn't start anymore. After I start my laptop and log in, the screen stays stuck on the login page (I tried with both gdm and lightdm).

Switching to console and starting startx manually I get the following errors:

mktemp: failed to create file via template ‘/tmp/serverauth.XXXXXXXXXX’: Permission denied
xauth:  file  does not exist
xauth:  unable to link authority file , use -n
use: X [:<display>] [option]
-a #                   default pointer acceleration (factor)
-ac                    disable access control restrictions
-audit int             set audit trail level
-auth file             select authorization file
...
Initializing built-in extension DRI2
Loading extension GLX
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error:            Cannot open "/tmp/filegRxhGH" to write keyboard description
>                   Exiting
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error:            Cannot open "/tmp/fileb9Lgzg" to write keyboard description
>                   Exiting
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
(EE) 
Fatal server error:
(EE) Failed to activate core devices.(EE) 
(EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information.
(EE) 
(II) AIGLX: Suspending AIGLX clients for VT switch
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: unexpected signal 2

I found reference to multiple similar problems and have tried various things.

Making sure I have enough space disk: here's a df output, it doesn't seem to be the problem.

root@blackbox:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6        22G   18G  2.9G  87% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            1.9G  4.0K  1.9G   1% /dev
tmpfs           376M  1.2M  374M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.9G  4.0K  1.9G   1% /run/shm
none            100M  4.0K  100M   1% /run/user

The permission of my .Xauthority file are wrong at startup:

root@blackbox:~# ls /home/florian/.Xauthority -al
-rw------- 1 root root 155 Mar 23 17:10 /home/florian/.Xauthority

However if I chown the file and reboot I still have the same problem.

I have uninstalled (with purge) and reinstalled xserver-xorg and ran dpkg-reconfigure xserver-xorg but no luck.

Update If I stop the display manager before retrying to start startx I get the following errors:

xauth:  timeout in locking authority file /home/florian/.Xauthority
...
Loading extension GLX
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Compat map for group 2 redefined
>                   Using new definition
> Warning:          Compat map for group 3 redefined
>                   Using new definition
> Warning:          Compat map for group 4 redefined
>                   Using new definition
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
(II) AIGLX: Suspending AIGLX clients for VT switch
xinit: connection to X server lost
^M
waiting for X server to shut down (EE) Server terminated successfully (0). Closing log file.

xinit: unexpected signal 2
xauth:  timeout in locking authority file /home/florian/.Xauthority

The only solution I found is to run startx as root, then it works but I shouldn't need to do that!

Update 2 The best solution I found so far is to switch to virtual terminal, remove the .Xauthority file then run ´startx´. But I need to do this every time I boot.

5
  • Are you stopping the display manager (e.g. sudo service lightdm stop) before attempting to startx from the virtual terminal? Mar 23, 2014 at 17:31
  • The log complains about not being able to write the keyboard configuration. Are the permissions on /tmp correct? (should be drwxrwxrwt).
    – Jos
    Mar 23, 2014 at 17:50
  • @JoS yes, that's correct. Mar 23, 2014 at 18:50
  • @steeldriver I wasn't, I tried now and got other errors; I updated the question. Mar 23, 2014 at 18:52
  • And what if you stop lightdm and remove the root-owned .Xauthority file? Mar 23, 2014 at 19:46

4 Answers 4

4

remove Xauthority THEN :

alt + ctrl + F1 THEN :

sudo pkill -9 Xorg THEN:

startx

hope this helps

4
  • 1
    This works, but I need to do it every time I boot. Mar 25, 2014 at 12:40
  • hello , what GUI you are using gnome or kde ? Mar 27, 2014 at 12:30
  • @MasterScrat, add it to your ~/.profile or /etc/rc.local file.
    – anonymous2
    May 30, 2016 at 15:56
  • For me, alt + ctrl + F1 logs out. Apr 8, 2022 at 18:35
3

Try to remove your .Xauthority file:

sudo rm /home/florian/.Xauthority

And restart your system (with your normal user account)

2
  • Nope, this doesn't change anything :( Mar 23, 2014 at 16:42
  • I added more of the failing startx output in the question Mar 23, 2014 at 16:46
2

Fixed this problem with:

sudo chmod 1777 /tmp /var/tmp
-1

You're getting that error because your user doesn't have permission to access your /tmp folder. Change the permissions of your /tmp folder and it should work just fine.

chmod 755 /tmp -R
1
  • 3
    This is not the correct answer and is in fact dangerous to run. Recursively changing the permissions on a system folder is a bad idea in general, but this command will just break a user's install. Please refer here for a proper solution.
    – Slinky
    Mar 13, 2017 at 1:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .