1

I'm pretty new to bash and only 6 months into Ubuntu so please bear with me.

I'm creating a post installation script https://github.com/jjdemitriUk/relutionDev written in bash. The reason I have everything separated into functions is because I have more than one machine that uses Ubuntu and this is a script that allows me to modularize what I want to install on a particular unit like my laptop gets a dev pack home comp gets media and common post install.

I've got to the setting function and I understand there are two ways of changing the settings.

  1. Back up your original preinstall & copy over post install... not working on this yet
  2. Run a simple command from the terminal such as gsettings set com.canonical.indicator.session show-real-name-on-panel true

In the terminal I type

 gsettings set com.canonical.indicator.session show-real-name-on-panel true

And the real name appears in the panel :)

Put it in a function

function homeSettings(){
   echo "Changing Settings";
   gsettings set com.canonical.indicator.session show-real-name-on-panel true;
   echo "Setting Changed";
}

and when run from terminal

./relutionDev homeSettings

I get terminal output of the echoes so I know its being called but no change of settings. I've been banging my head against a wall to no avail. I've looked at other questions with close relation to mine regarding changing wallpaper and cron jobs but mine isn't a wallpaper or a cron job. Can anyone please point me in the right direction?

0
2

You're running your installation script with sudo but gsettings are a per user configuration system. that's why you're no seeing any change.

Try without sudo (as a normal user) and it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.