Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
Are you stopping the display manager (e.g. sudo service lightdm stop) before attempting to startx from the virtual terminal? –  steeldriver Mar 23 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 at 17:50
    
@JoS yes, that's correct. –  MasterScrat Mar 23 at 18:50
    
@steeldriver I wasn't, I tried now and got other errors; I updated the question. –  MasterScrat Mar 23 at 18:52
    
And what if you stop lightdm and remove the root-owned .Xauthority file? –  steeldriver Mar 23 at 19:46

2 Answers 2

remove Xauthority THEN :

alt + ctrl + F1 THEN :

sudo pkill -9 Xorg THEN:

startx

hope this helps

share|improve this answer
1  
This works, but I need to do it every time I boot. –  MasterScrat Mar 25 at 12:40
    
hello , what GUI you are using gnome or kde ? –  Ahmed Al-attar Mar 27 at 12:30

Try to remove your .Xauthority file:

sudo rm /home/florian/.Xauthority

And restart your system (with your normal user account)

share|improve this answer
    
Nope, this doesn't change anything :( –  MasterScrat Mar 23 at 16:42
    
I added more of the failing startx output in the question –  MasterScrat Mar 23 at 16:46

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.