Ask Your Question
2

Need command line help

asked 2018-08-19 09:07:57 -0600

tablepc gravatar image

I've been working to automate set up of PCs. I need to change a couple settings in gnome-terminal, but since that schema is relocatable I had to specify the path. I had no luck, but one of the kind folks here showed me the basics of how to do it and I ended up trying the following two commands:

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default)/ use-system-font false

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default)/ font 'Monospace 24'

These seemed to work since there were no error messages from gsettings and when I did Gets afterwards the returned values were what I expected (false and monospace 24). However, the settings in the terminal did not change. Another kind person here helped me verify the condition. and then I filed an issue with the folks at Gnome in regard to gnome-terminal.

The reply from the Gnome folks was the

gsettings get org.gnome.Terminal.ProfilesList default

part of the commands above returns the Profile ID enclosed in single quotes and that the Set part of the commands created a new profile with the single quotes and set the parameter. This led to the confusion where the parameters were verified as being set, but the terminal didn't change. They say I need to remove the single quotes from around the Provide ID that is returned in the get profile part of the command. I have no idea how to do that so the set parameter part of the command will work properly.

Thanks in advance for your help on this.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-08-21 07:02:32 -0600

tablepc gravatar image

One of the kind folks at Fedora Forum helped me out and this form of the command works fine:

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d "'")/ use-system-font false

The key is the | tr -d "'" that removes the single quotes. Care must be taken with this approach as this will remove all occurrences for the character; in this case single quote. The good news is that Profile IDs don't contain single quotes within them; so this works for this purpose.

edit flag offensive delete link more
0

answered 2018-08-19 14:09:04 -0600

ed209 gravatar image

If I understood correctly your problem, you need to change the default behaviour of gnome-terminal for several PCs.

May I suggest to modify the parameters contained in

/usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml

for, say, the default font Monospace 12 and spread the modified file across different boxes afterwards?

edit flag offensive delete link more

Comments

Thanks for your reply.

Two things hold me back from this approach I think fedora reads the settings from a compiled version of all the schema XML files and I don't know how to do that. Also, I already have a nice long bash script with most of the gnome setting I need to do in the form a gsettings commands; so I would rather get this figured out so I can have all the settings done the same way and in one script.

tablepc gravatar imagetablepc ( 2018-08-20 14:49:15 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-08-19 09:07:57 -0600

Seen: 87 times

Last updated: Aug 21