Author Topic: Running .network-autostart script not applying changes  (Read 2261 times)

Cytochromec

  • Full Member
  • ***
  • Posts: 46
    • View Profile
Running .network-autostart script not applying changes
« 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?

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 286
    • View Profile
Re: Running .network-autostart script not applying changes
« Reply #1 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.