Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mate-display-properties: Use less generic name for monitors.xml to avoid clashing with other desktops #712

Open
davidhedlund opened this issue Jul 23, 2023 · 2 comments

Comments

@davidhedlund
Copy link

davidhedlund commented Jul 23, 2023

Expected behaviour

cinnamon is using a dedicated name, cinnamon-monitors.xml. This doesn't cause the file to be overwritten by the display preferences if other desktop environment are used on the same distro. If MATE and GNOME followed the same approach, the file name would be mate-monitors.xml, and gnome-monitors.xml, respectively.

Actual behaviour

monitors.xml in Ubuntu 23.10, 23.04, and 22.04:

<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>1</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>Virtual-1</connector>
          <vendor>unknown</vendor>
          <product>unknown</product>
          <serial>unknown</serial>
        </monitorspec>
        <mode>
          <width>1600</width>
          <height>900</height>
          <rate>60.000</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
</monitors>

monitors.xml in Ubuntu 22.04 (with ubuntu-mate-desktop installed), or 23.04 (with ubuntu-mate-desktop installed):

<monitors version="2">
  <configuration>
    <migrated/>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>Virtual-1</connector>
          <vendor>???</vendor>
          <product>0x0000</product>
          <serial>0x00000000</serial>
        </monitorspec>
        <mode>
          <width>1600</width>
          <height>900</height>
          <rate>60.000</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
  <configuration>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>1</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>Virtual-1</connector>
          <vendor>unknown</vendor>
          <product>unknown</product>
          <serial>unknown</serial>
        </monitorspec>
        <mode>
          <width>1280</width>
          <height>800</height>
          <rate>59.810</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
</monitors>

monitors.xml in Ubuntu MATE 22.04, Ubuntu MATE 23.04, ubuntu-mate-desktop from Ubuntu 22.04, or ubuntu-mate-desktop from Ubuntu 23.04:

<monitors version="1">
  <configuration>
      <clone>no</clone>
      <output name="Virtual-1">
          <vendor>???</vendor>
          <product>0x0000</product>
          <serial>0x00000000</serial>
          <width>1600</width>
          <height>900</height>
          <rate>60</rate>
          <x>0</x>
          <y>0</y>
          <rotation>normal</rotation>
          <reflect_x>no</reflect_x>
          <reflect_y>no</reflect_y>
          <primary>yes</primary>
      </output>
      <output name="Virtual-2">
      </output>
      <output name="Virtual-3">
      </output>
      <output name="Virtual-4">
      </output>
  </configuration>
</monitors>

Steps to reproduce the behaviour

Steps I used to reproduce the issue in Ubuntu 22.04 with ubuntu-mate-desktop installed:

MATE does not generate a backup file of monitors.xml if you run the above steps and starting with MATE first.

MATE general version

1.26.0

Package version

mate-display-properties 1.26.0

Linux Distribution

Ubuntu MATE 22.04, Ubuntu 22.04

Link to bugreport of your Distribution (requirement)

@davidhedlund davidhedlund changed the title "$HOME/.config/monitors.xml" generated by MATE is incompatible with GNOME and vice versa mate-display-properties: "$HOME/.config/monitors.xml" generated by MATE is incompatible with GNOME and vice versa Jul 23, 2023
@davidhedlund davidhedlund changed the title mate-display-properties: "$HOME/.config/monitors.xml" generated by MATE is incompatible with GNOME and vice versa mate-display-properties: monitors.xml is incompatible with GNOME (and vice versa) Jul 23, 2023
@zhuyaliang
Copy link
Member

zhuyaliang commented Jul 24, 2023

We need to replace monitors.xml with mate-monitors.xml here
monitors.xml

@davidhedlund davidhedlund changed the title mate-display-properties: monitors.xml is incompatible with GNOME (and vice versa) mate-display-properties: Use less generic name for monitors.xml to avoid clashing with other desktops Jul 24, 2023
@davidhedlund
Copy link
Author

davidhedlund commented Jul 24, 2023

We need to replace monitors.xml with mate-monitors.xml here monitors.xml

Yes, the GNOME developers pointed out the same line for their project: https://gitlab.gnome.org/GNOME/mutter/-/issues/2919#note_1799008

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants