WHERE XRANDR SAVE SETTINGS
XRandR, an acronym for X Resize and Rotate, is an important tool in the Linux graphics stack. It lets you configure and manage your display setups, allowing you to control things like resolution, rotation, and mirroring. But what if you want to save these settings so that they're automatically applied every time you log in or reboot your system?
1. The Xauthority Issue
One common problem is that XRandR settings might not be saved because of the xauthority issue.
The Xauthority file is a hidden file used by the X server to store authorization information for graphical applications.
If the xauthority file is missing or does not have the correct permissions, XRandR might not be able to save its settings.
2. Creating an Xauthority File
To create an xauthority file, open a terminal window and type the following command:
touch ~/.Xauthority
Next, you need to change the permissions of the file so that it's accessible only to you. To do this, type the following command:
chmod 600 ~/.Xauthority
3. Editing XRandR Settings
Once you have created an xauthority file with the correct permissions, you can use XRandR to edit your display settings.
To do this, open a terminal window and type the following command:
xrandr
This will display a list of your current display settings.
To change the resolution of a display, use the following syntax:
xrandr --output DISPLAY_NAME --mode RESOLUTION
For example, to change the resolution of the display connected to your DisplayPort to 1920×1080, you would type:
xrandr --output DP-1 --mode 1920x1080
4. Saving XRandR Settings
Once you have made your changes, you can save them by typing the following command:
xrandr -s
This will save your settings to the Xauthority file.
The next time you log in or reboot your system, your display settings will be automatically applied.
5. Troubleshooting
If you're having problems saving your XRandR settings, there are a few things you can try:
- Make sure that you have created an xauthority file with the correct permissions.
- Try using a different graphical user interface (GUI). Some GUIs, such as GNOME, have their own display settings tools.
- Check the logs for any errors. You can find the logs in the /var/log directory.
Conclusion
XRandR is a powerful tool that can be used to configure and manage your display setups in Linux.
By following the steps outlined in this article, you can save your XRandR settings so that they're automatically applied every time you log in or reboot your system.
Frequently Asked Questions
- What is XRandR?
XRandR is an acronym for X Resize and Rotate. It's a tool in the Linux graphics stack that lets you configure and manage your display setups.
- How do I save my XRandR settings?
To save your XRandR settings, open a terminal window and type the following command:
xrandr -s
- Why aren't my XRandR settings being saved?
There are a few possible reasons why your XRandR settings might not be being saved. One common reason is that you don't have an xauthority file with the correct permissions.
- How do I create an xauthority file?
To create an xauthority file, open a terminal window and type the following command:
touch ~/.Xauthority
Next, you need to change the permissions of the file so that it's accessible only to you. To do this, type the following command:
chmod 600 ~/.Xauthority
- What are some common problems that I might encounter when using XRandR?
Some common problems that you might encounter when using XRandR include:
- The xauthority issue
- Display settings not being saved
- Problems with multiple monitors
- Problems with screen tearing

Leave a Reply