How to protect xorg.conf.d from apt/dpkg?

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
chrisra
Level 1
Level 1
Posts: 30
Joined: Wed Dec 30, 2015 1:39 pm

How to protect xorg.conf.d from apt/dpkg?

Post by chrisra » Fri Jan 27, 2017 12:58 pm

Hi everyone,

recently I noticed that some configuration I had made in /usr/share/X11/xorg.conf.d/10-evdev.conf seems to have vanished. I don't know how to look at the history of files according to apt/dpkg, so I don't know exactly when that happened. What I'd like to rather know now: how can I protect this sort of configuration from being deleted or overwritten? Not allowing the files to be changed probably isn't a good solution, but if that's what it takes, how could I do that? Is there another way, some user-specific configuration for Xorg?
Last edited by chrisra on Fri Jan 27, 2017 2:28 pm, edited 1 time in total.

grumpy_geek
Level 2
Level 2
Posts: 80
Joined: Tue Jan 03, 2017 3:50 am
Contact:

Re: How to protect xorg.conf.d from apt/dpkg?

Post by grumpy_geek » Fri Jan 27, 2017 1:52 pm

10-evdev.conf is part of the package xserver-xorg-core:

Code: Select all

user:> apt-file search 10-evdev.conf
xserver-xorg-core: /usr/share/X11/xorg.conf.d/10-evdev.conf
user:> dpkg -S 10-evdev.conf
xserver-xorg-core: /usr/share/X11/xorg.conf.d/10-evdev.conf
In /var/log/apt/history.log you'll find this package's history of changes:

Code: Select all

Start-Date: 2017-01-13  19:31:13
Commandline: apt-get upgrade
Requested-By: geek (1000)
Upgrade: [...] xserver-xorg-core:i386 (2:1.18.3-1ubuntu2, 2:1.18.4-0ubuntu0.2) [...]
End-Date: 2017-01-13  19:32:53
(You may load the file into a text editor and scan for the package name.)

As for protecting custom settings: I'd copy and save the customized files, thus keeping their contents available for manual restauration...

User avatar
chrisra
Level 1
Level 1
Posts: 30
Joined: Wed Dec 30, 2015 1:39 pm

Re: How to protect xorg.conf.d from apt/dpkg?

Post by chrisra » Fri Jan 27, 2017 2:40 pm

Thanks for pointing me to apt-file, which I'm ashamed to say I didn't know. Indeed I can tell that the package was updated nine days ago from version 1.15.1-0ubuntu2.1 to 1.15.1-0ubuntu2.7 when I ran apt-get upgrade, and xorg.conf.d was modified at the same time. Around a few corners, but in the end that indeed tells me when it happened and proves it did.

Now I just have to find a better way than watching for changes and replacing or manually merging the file...

Post Reply

Return to “Software & Applications”