I am running Ubuntu 14.04 with LTSP. I am using usbmount to mount usb thumbdrives outside of the desktop which works great. The problem is that when a user is logged into the desktop and connects a thumbdrive they are shown an error alert box similar to
"Unable to mount Lexar. Device /dev/sda1 is already mounted at '/media/usb0'.
I've been able to stop the issue for the logged in user account with gsettings. How can I achieve
gsettings set org.gnome.desktop.media-handling automount false
for all users from the command line?
I've tried a udev rule like suggested here but that did not fix the issue
update #1
So I tried using Upstart Session jobs without any luck.
$ cat /usr/share/upstart/sessions/ltsp-replace-usb-automount-with-usbmount.conf
description "disable default automounting because it displays error boxes to the end user"
start on desktop-session-start
script
gsettings set org.gnome.desktop.media-handling automount false
end script
and also
$ cat /usr/share/upstart/sessions/ltsp-replace-usb-automount-with-usbmount.conf
description "disable default automounting because it displays error boxes to the end user"
start on desktop-start
script
gsettings set org.gnome.desktop.media-handling automount false
end script
I cannot find any indication the jobs actually ran.