1

when I logged in to my desktop and listed the contents of the .xsession-errors file in my home directory, the following is found . kindly let me know what to do to correct the errors

mktemp: failed to create file via template ‘/tmp/config-err-XXXXXX’: Permission denied
/usr/sbin/lightdm-session: line 29: : No such file or directory
cat: : No such file or directory
truncate: cannot open ‘’ for writing: No such file or directory
/usr/sbin/lightdm-session: line 29: : No such file or directory
cat: : No such file or directory
truncate: cannot open ‘’ for writing: No such file or directory
Script for ibus started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
init: at-spi2-registryd main process ended, respawning
 init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd respawning too fast, stopped

As requested the output of ls -ld /tmp is furnished below:

drwxr-xr-x 4 root root 4096 Oct  1 15:17 /tmp

the owner and the group seems to be root and how to correct

Also, my bash shell is regularly crashing now

4
  • Do you experience any errors during your graphical session? The first line seems to indicate that /tmp is not writable. Please append the output of ls -ld /tmp to your question by editing it.
    – Nephente
    Oct 1, 2015 at 9:24
  • this is the output of ls -ld /tmp drwxr-xr-x 4 root root 4096 Oct 1 14:17 /tmp
    – user456495
    Oct 1, 2015 at 9:46
  • 1
    1.) Please don't put any further output in comments. Below your question, there is a field 'edit'. Use it and append the output to your original post! 2.) The permissions are wrong. As they are now, only root may write to /tmp.
    – Nephente
    Oct 1, 2015 at 9:53
  • Did you get the issue resolved? If my answer answer solved it for you, consider accepting it. Otherwise please ask back! Don't want to leave it unresolved :-)
    – Nephente
    Oct 3, 2015 at 9:52

1 Answer 1

1

The first line of the excerpt from .xsession-errors posted, shows that /tmp cannot be written to. This is confirmed by the output of ls -ld /tmp showing permissions 755 for /tmp, when they should be 1777 (read/write/execute permissions for everyone + sticky bit, so only root can remove the directory).

To rectify this, do

sudo chmod 1777 /tmp

Edit: As terdon mentions quite rightfully in the comments, the display manager (tested with gdm and lightdm) automatically restarts when you log out from the graphical shell (Unity, GNOME,...). And with it, the X-server is also restarted. No need to do it manually.


Take the following as a reference, if you ever need to restart lightdm for some other reason.

Restart the X-Server and see if this error and hopefully the others as well are gone. It should be enough to restart the session manager. Log out from your graphical session.

  • Use Ctrl+Alt+F1 to switch to a console.
  • Login with your credentials and do

    sudo service lightdm restart
    

Note: It might be that you need to set the approriate permissons 1777 for /tmp/.X11-unix. See this post on Unix.SE.

6
  • i will correct the chmod soon, by the by how to restart the X-server pl..
    – user456495
    Oct 1, 2015 at 10:04
  • @user456495 See the edit. I believe it suffices to restart lightdm
    – Nephente
    Oct 1, 2015 at 10:57
  • Logging out from the graphical session and logging back in will restart the X server. No need to also use service lightdm restart.
    – terdon
    Oct 1, 2015 at 11:29
  • @terdon. Maybe 'graphical session' was a poor choice of words. I meant logging out from the graphical shell, e.g Unity, GNOME, etc... This brings you back to the greeter. As I understand it, the X-Server is started by the display manager service at boot time. Does lightdm and hence X restart when you log out from e.g Unity?
    – Nephente
    Oct 1, 2015 at 11:46
  • It should, yes. Unless lightdm behaves very differently (I just checked with gdm). You can test this by comparing the output of pgrep X before and after logging out/back in again. If they're different, X has been restarted.
    – terdon
    Oct 1, 2015 at 12:12

You must log in to answer this question.

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