xauth: timeout in locking authority file /home/Xuser/.Xauthority



  • $ xauth list
    xauth:  timeout in locking authority file /home/mainuser/.Xauthority
    

    When logged into the Ubuntu GUI Unity, as one user you created when installing the operating system. If for some reason you want another user, other than user "mainuser" to be able to run GUI's. It appears this does not work by default, even with su - <user> reading in the environment.

    To resolve

    Set the environment

    mainuser: $> su - stack
    mainuser: $> XAUTHORITY=/home/stack/.Xauthority
    mainuser: $> xauth list
    xauth:  file /home/stack/.Xauthority does not exist
    mainuser: $> touch /home/stack/.Xauthority
    mainuser: $> xauth list
    

    Logged in as the mainuser, add access for the stack user

    $ xhost + si:localuser:stack
    localuser:stack being added to access control list
    

    This should allow you to run the GUIs now. If you need this to be a permanent thing, add XAUTHORITY=/home/stack/.Xauthority to your .bashrc file.



© Lightnetics 2024