How can I have xfce automatically adjust to changing available outputs?

5,917
$ xrandr --auto

From xrandr man page:

--auto: For connected but disabled outputs, this will enable them using their preferred mode (or, something close to 96dpi if they have no preferred mode). For disconnected but enabled outputs, this will disable them.

Share:
5,917

Related videos on Youtube

Ken Kinder
Author by

Ken Kinder

Stack Faves: Python Vue.js /w Quasar Heroku Preferences: Tacos or Hamburgers: Tacos MySQL or Postgres: Postgres VueJS or Angular: VueJS Editor or IDE: IDE Chrome or Firefox: Firefox Linux or Mac: Linux, currently Flask or Django: Yes

Updated on September 18, 2022

Comments

  • Ken Kinder
    Ken Kinder over 1 year

    In xfce, I can run Settings -> Display to change my preferred output monitor. What I haven't found an option for is to have it automatically adjust to a change in available outputs.

    For example, if I'm using a DVI display, but undock my laptop, XFCE will not automatically realize that I no longer have a working display and change the output. Gnome did do this, though I'm not sure through what service. I'd like to have some way of making sure I always have at least one working output automatically.

    SIDE NOTE: This is related to another question of mine, If I just use a window manager and not a desktop environment, how do I get automatic dock/undock resolution updates?, but is for xfce, not any generic window manager.

  • pl1nk
    pl1nk almost 12 years
    This work for me at least for my setup.
  • Aleksandr Dubinsky
    Aleksandr Dubinsky over 7 years
    But this is a one-time command, not a service, right?