Need some Ansible help - Page 2
FedoraForum.org - Fedora Support Forums and Community
Page 2 of 2 FirstFirst 1 2
Results 16 to 19 of 19
  1. #16
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    208
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Progress:

    I got sidetracked for a bit with gconf then I read the dconf replaced gconf. Then I read the dconf serves as a backend for gsettings and that gsettings does a fair amount of checking to be sure a given gsettings command is correct in the key being called out and the value of the key. here are a couple typical set commands:

    Code:
    gsettings set org.gnome.desktop.interface cursor-theme 'Bluecurve'
    gsettings set org.gnome.desktop.interface toolkit-accessibility false
    I wanted to be sure I was getting things right so I decided to use gsettings as a way to verify the settings I want to make. I am glad I did. The feedback from gsettings though very sparse at least let me know I had an error so I could do the research etc. to fix it. So far I have between 150 and 200 lines of gsettings in a bash script that work. I still have some keys to find. Most of the schemas are in /usr/share/lib-2.0/schemas, but not all of them are there. Also I haven't really searched all of the schema in /usr/share/lib-2.0/schemas yet either. Some of the keys are lists of strings. I haven't figured out yet how to do them correctly yet.

    Thinking back on my situation: All of the systems here get the same applications removed and the same application installed and I already have bash scripts to take care of that. I do a clean install from DVD to each machine. No machine management is done over the network. I already have most of the key settings I need in a bash script. Given all of that redoing everything in Ansible doesn't make sense. So I think I will just use my scripts for now .

    The one big mystery I have to solve yet is that of the "serialized GVariant". the values of keys are serialized GVariants. Integers, binaries, and simple strings have been straight forward. How to format a list though, is still not clear. So far everything I have tried has not been acceptable to gsettings. For instance I want to set the key that holds the list of favorite applications. in the org.gnome.shell schema there is the key favorite-apps. I thought something like this should work, but it does not:

    Code:
    gsettings set org.gnome.shell favorite-apps ['libreoffice-writer.desktop', 'libreoffice-calc.desktop',  'grsync.desktop']
    I've tried variants, but so far no luck.

    Any ideas?
    Have a Great Day!

  2. #17
    Join Date
    Dec 2017
    Location
    USA
    Posts
    46
    Windows 7 Firefox 60.0

    Re: Need some Ansible help

    Is it possible how you set up the list here simply needs to be passed in as a single variable-- i.e., put double quotes around your whole array:
    Code:
    "['libreoffice-writer.desktop', 'libreoffice-calc.desktop',  'grsync.desktop']"
    And the quoting thing is a shell problem. It probably needs to pass to the gsettings application a single long string, which consists of the square braces and everything inside it.
    Although I would suspect it takes a comma separated list. But you maybe can check if you can find a way to dump the current set of values for that variable.

  3. #18
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    208
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Thank you very much that worked Great!!

    I just put the double quotes around the array and it worked. I really appreciate your help.
    Have a Great Day!

  4. #19
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    208
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Continuing progress. One of the parameters I wanted to set automatically was display resolution. The folks at Gnome provided these:

    You can not set resolution with gsettings... You will have to use D-Bus interface - org.gnome.Mutter.DisplayConfig
    I did some searching and and found some articles that led me to think that setting this is going to be complicated; So I'm going to wait on this for a while.

    or copy the ~/.config/monitors.xml file around
    My systems do not seem to have a monitors.xml file. From my additional reading it seems like a system only has a monitors.xml file if you have more that one monitor on the system.

    I also wanted to set some parameters for the gnome-terminal. It seemed quite straight forward until I got a message from gsettings that said the keys in org.gnome.Terminal.Legacy.Profile are relocatable and I had to provide the path for the setting. I tried a bunch of different things, but had no luck. Then the folks at AskFedora showed me the correct way to include the path with this example:

    Code:
    gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default)/ use-system-font false
    I noticed that the path being used was the default, but that seemed reasonable since I don't think I have changed it. This command runs with no messages from gsettings, but when I open the gnome terminal and it's preferences the parameter had not changed.

    I guessing the real path is not the default. Any ideas?
    Have a Great Day!

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •