Score:1

gsettings command not affecting settings

cn flag

I was trying to write a script that would enable and disable Do Not Disturb. As such, I was using the gsettings command to enable and disable notifications

I used these two commands:

gsettings set org.gnome.desktop.notifications show-banners true
gsettings set org.gnome.desktop.notifications show-banners false

However, when actually executing these commands and testing them with notify-send, they did not change anything at all. When I edited the flags manually using dconf-editor, however, the notifications were successfully enabled and disabled. Why isn't gsettings working, and is there an alternative?

I'm on Ubuntu 20.04.

Thanks!

vanadium avatar
cn flag
Can't reproduce this. For me, your gsettings commands work perfectly. When setting to "false", do not disturb symbol (the bell with a stroke through it) appears, and messages do not anymore pop up (though, obviously, they still can be seen when opening the notifications pane). Do you see any error message when executing these commands?
ronin avatar
cn flag
@vanadium I don't see an error message, the command just goes through without an issue and the prompt for the next line appears, just without any effect. Thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.