Comment 0 for bug 719338

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote : [Xubuntu] Disable automount

Binary package hint: ubiquity

Hi,

Ubiquity integrates with thunar-volman in Xfce 4.4 and 4.6 (Bug #107259). This was rather straightforward, because thunar-volman used to store its configuration in a simple rc file (read file, update entries if they exist, add them if they are missing, and restore them after the installation).

However, in Xfce 4.8, thunar-volman moved to xfconf, which means that its conf is now in xml (yay for parsing!), and managed by xfconfd (so any manual edition of the conf will be overwritten by xfconfd). Unfortunately, there are no python bindings released/packaged for xfconf, so I'm not sure of the best way to do it...

My skills in python are not that great, so I used a test script (instead of patching ubiquity directly), so I could test more easily.
What it does:
* read the previous stored user config, if it exists (if the user didn't change the settings, it won't).
* launch xfconf-query with he correct options to disable automounting.
* launch xfconf-query to restore the previous settings (either reset to the values set by the user, or reset to the system values if the stored config didn't exist).
It uses minidom to parse the config, and then spawns xfconf-query several times using os.system (yeah, this is not that nice -- it's probably not very robust either, that's why I didn't provide a patch directly also).

Feel free to improve it, or if you have any better way of doing that it 'd be great.