ubermix Forums

Technical => Development and Scripting => Topic started by: Cytochromec on April 27, 2015, 09:20:58 AM

Title: Running .network-autostart script not applying changes
Post by: Cytochromec on April 27, 2015, 09:20:58 AM
I have added a line to our update.sh script to change some keyboard shortcuts.
If I open a terminal and run
Code: [Select]
sh .network-autostart the changes are made. However on boot/network-disconnect-reconnect the changes don't get made.

Here are the two lines:
Code: [Select]
sudo -u user gsettings set org.gnome.desktop.wm.keybindings show-desktop "['']"
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['']" #this is optional but I included it for testing purposes

Other parts of the script work fine on boot. I am thinking it has something to do with how .network-autostart is called. Any thoughts?
Title: Re: Running .network-autostart script not applying changes
Post by: jnetman1 on April 29, 2015, 08:32:24 PM
Probably has something to do with the script running as root and a missing environment. Instead of sudo, try:

su -c "gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['']\"" - user

Should work better.