How do I make xrandr settings permanent in Debian 9?

6,288

You can do this by using an .xinitrc file in your home directory, just be sure to append an & to each command.

See here for more information.

Share:
6,288

Related videos on Youtube

Leoni
Author by

Leoni

Updated on September 18, 2022

Comments

  • Leoni
    Leoni over 1 year

    Keep in mind I'm fairly new to GNU/Linux and I've decided to try out Debian for it's history. I've been able to set the screen resolution to 1600x900 (which is what I need), however I haven't been able to find a way to save those settings. For example, I don't have "xorg.conf" nor "xorg.conf.d", I can't even configure it because it says I'm already running X server. I'm pretty sure there is other ways to do this, but most info I find seems vague as to how-to things.

    Edit: I'm now able to set the resolution to "1600x900_60.00" each time I get into Debian but manually. I've created a new "xorg.conf" file manually, adding a "naked" screen section, but it seems that it didn't work so I also checked the "/var/log/Xorg.0.log" file to see what went wrong and this is the output:

    [ 2969.964] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
    [ 2969.964] _XSERVTransMakeAllCOTSServerListeners: server already running
    [ 2969.964] (EE) Fatal server error:
    [ 2969.964] (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
    [ 2969.964] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help.
    [ 2969.964] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    [ 2969.964] (EE)
    [ 2969.964] (EE) Server terminated with error (1). Closing log file.

    I still gotta try the ".xinitrc" method.

  • dirkt
    dirkt over 6 years
    Depending on the display manager, on Debian .xinitrc may or may not get executed...
  • Kusalananda
    Kusalananda over 6 years
    If .xinitrc is not executed, create a symbolic link from it called .xsession. It's usually executed when logging in through a graphical login screen (such as XDM or GDM).
  • HostFission
    HostFission over 6 years
    Why is this getting downvoted? Just because there is a different way it doesn't make it wrong. For those (like myself) that run multi head on nvidia based hardware this is a PITA to put in xorg.conf as if you pull a screen, or move the video card, etc. X wont fallback to a default configuration that works.