Software⏱️ 3 min read📅 2026-06-11

How to Fix: startx results in error "timeout in locking authority file /home/myaccount/.Xauthority"

X11 authority file timeout issue resolved by changing home directory permissions.

Quick Answer: Change home directory permissions to resolve X11 authority file timeout issues.

The error 'timeout in locking authority file /home/myaccount/.Xauthority' occurs when the X Window System is unable to properly authenticate and authorize access to the system. This error affects users who are trying to start a graphical user interface (GUI) session using the `startx` command.

This issue can be frustrating, especially for users who rely on GUI applications or have specific display settings. However, by following the steps outlined in this guide, you should be able to resolve the problem and get back to your normal desktop experience.

🛑 Root Causes of the Error

  • The primary cause of this error is related to file permissions issues. The X Window System relies on a secure authentication mechanism using Xauth files, which are stored in the user's home directory. If the file permissions for these directories are not set correctly, it can lead to authorization failures and the 'timeout in locking authority file' error.
  • Another possible cause is related to the use of SSH sessions, as you mentioned. SSH connections can sometimes interfere with the X Window System's ability to authenticate users properly.

🔧 Proven Troubleshooting Steps

Chowning Home Directory Permissions

  1. Step 1: Open a terminal and navigate to your home directory using the `cd` command.
  2. Step 2: Use the `chown -R myaccount:myaccount /home/myaccount` command to change the ownership of all files in the `/home/myaccount` directory to your current user ID (`myaccount`). The `-R` option ensures that the change is applied recursively to all subdirectories and files.
  3. Step 3: After running this command, restart your desktop session or run `startx` again to test if the issue has been resolved.

Deleting Xauth Files

  1. Step 1: Delete the existing `.Xauthority` file in your home directory using the `rm` command. Be cautious when deleting files, as this will permanently remove them from your system.
  2. Step 2: After deleting the `.Xauthority` file, restart your desktop session or run `startx` again to test if the issue has been resolved.

🎯 Final Words

To summarize, the 'timeout in locking authority file' error is often caused by file permissions issues or interference from SSH sessions. By following the steps outlined in this guide, you can resolve the problem and get back to your normal desktop experience. Remember to regularly check and update your system's file permissions to avoid similar issues in the future.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions