[SOLVED] Missing access to privacy settings

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
nkollek
Level 1
Level 1
Posts: 3
Joined: Mon Aug 12, 2019 9:59 am

[SOLVED] Missing access to privacy settings

Post by nkollek » Mon Aug 12, 2019 11:55 am

Hello,
I'm using LMDE3. When I try to access Settings/Privacy nothing happens. All other settings seems to be okay.
I have tried to access Privacy settings from the shell withe the foolowing results:

Code: Select all

$ sudo cinnamon-settings
[sudo] Passwort für noko:      
True
Using pam module (python3-pampy)
Loading Privacy module
Traceback (most recent call last):
  File "/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", line 668, in button_press
    self.side_view_nav(widget, None, category)
  File "/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", line 170, in side_view_nav
    self.go_to_sidepage(cat, filtered_path, user_action=True)
  File "/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", line 185, in go_to_sidepage
    sidePage.build()
  File "/usr/share/cinnamon/cinnamon-settings/bin/SettingsWidgets.py", line 123, in build
    self.module.on_module_selected()
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_privacy.py", line 78, in on_module_selected
    if nm_client is not None and nm_client.connectivity_check_get_available():
AttributeError: 'Client' object has no attribute 'connectivity_check_get_available'
$ 
I have no idea what is wrong here. Can anybody give me a hint or help?
Last edited by Moem on Thu Aug 22, 2019 6:42 am, edited 1 time in total.
Reason: Marked this as [SOLVED] for you; please note that you can and should do this for your own topics. Thanks!

User avatar
smurphos
Level 12
Level 12
Posts: 4113
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Missing access to privacy settings

Post by smurphos » Mon Aug 12, 2019 12:56 pm

Cinnamon 4.2 privacy settings module is broken running on LMDE3 - https://github.com/linuxmint/cinnamon/issues/8790.

It appears to be due to the new setting available on main edition Mint to turn on or off connectivity checking. The package that provides this function doesn't actually exist on LMDE3.

If you need to tweak the recent files settings pending a fix being applied and released you can still access them via dconf-editor (apt install dconf-editor) or gsettings in the command line.

Example commands below.

Remember recent files on

Code: Select all

gsettings set org.cinnamon.desktop.privacy remember-recent-files true
Remember recent files off

Code: Select all

gsettings set org.cinnamon.desktop.privacy remember-recent-files false
Never forget recent files

Code: Select all

gsettings set org.cinnamon.desktop.privacy recent-files-max-age -1
Forget recent files after 14 days

Code: Select all

gsettings set org.cinnamon.desktop.privacy recent-files-max-age 14
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

nkollek
Level 1
Level 1
Posts: 3
Joined: Mon Aug 12, 2019 9:59 am

Re: Missing access to privacy settings

Post by nkollek » Mon Aug 12, 2019 4:18 pm

Hi smurphos,
thank you very much for your fast answer and your Help.
It was very helpful to me !

User avatar
smurphos
Level 12
Level 12
Posts: 4113
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Missing access to privacy settings

Post by smurphos » Sat Aug 17, 2019 6:12 am

If you want to manually fix the privacy module pending an official update you can by replacing the module with the version immediately prior to the new code for enabling/disabling the connectivity-check being added.

Open cs_privacy.pymodule in Xed with Admin privileges

Code: Select all

xed admin:///usr/share/cinnamon/cinnamon-settings/modules/cs_privacy.py
Then replace the code in it's entirety with the code below and save the file.

Ref - https://github.com/linuxmint/cinnamon/b ... privacy.py

Code: Select all

#!/usr/bin/python3

from GSettingsWidgets import *

PRIVACY_SCHEMA = "org.cinnamon.desktop.privacy"
GTK_RECENT_ENABLE_KEY = "remember-recent-files"
GTK_RECENT_MAX_AGE = "recent-files-max-age"


class Module:
    name = "privacy"
    comment = _("Cinnamon privacy settings")
    category = "prefs"

    def __init__(self, content_box):
        keywords = _("privacy, recent, gtk, private")
        sidePage = SidePage(_("Privacy"), "cs-privacy", keywords, content_box, module=self)
        self.sidePage = sidePage
        self.settings = Gio.Settings(schema=PRIVACY_SCHEMA)

    def on_module_selected(self):
        if not self.loaded:
            print("Loading Privacy module")

            page = SettingsPage()
            self.sidePage.add_widget(page)

            switch = GSettingsSwitch("", PRIVACY_SCHEMA, GTK_RECENT_ENABLE_KEY)
            switch.label.set_markup("<b>%s</b>" % _("Remember recently accessed files"))
            switch.fill_row()
            page.add(switch)

            settings = page.add_reveal_section(_("Recent files"), PRIVACY_SCHEMA, GTK_RECENT_ENABLE_KEY)

            self.indefinite_switch = Switch(_("Never forget old files"))
            self.indefinite_switch.content_widget.connect("notify::active", self.on_indefinite_toggled)
            settings.add_row(self.indefinite_switch)

            widget = SettingsWidget()
            label = SettingsLabel(_("Number of days to remember old files"))
            widget.pack_start(label, False, False, 0)
            self.spinner = Gtk.SpinButton.new_with_range(1.0, 365.0, 1.0)
            self.spinner.set_digits(0)
            self.spinner.set_increments(1, 10)
            widget.pack_end(self.spinner, False, False, 0)
            self.revealer = SettingsRevealer()
            vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
            vbox.add(Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL))
            list_box = Gtk.ListBox()
            row = Gtk.ListBoxRow()
            row.add(widget)
            list_box.add(row)
            vbox.add(list_box)
            self.revealer.add(vbox)
            settings.box.add(self.revealer)

            start_age = self.settings.get_int(GTK_RECENT_MAX_AGE)

            if start_age == -1:
                self.indefinite_switch.content_widget.set_active(True)
                self.revealer.set_reveal_child(False)
                self.spinner.set_value(30)
            else:
                self.indefinite_switch.content_widget.set_active(False)
                self.revealer.set_reveal_child(True)
                if start_age == 0: # Shouldn't happen, unless someone manually sets the value
                    self.settings.set_int(GTK_RECENT_MAX_AGE, 30)
                self.bind_spinner()

    def bind_spinner(self):
        self.settings.bind(GTK_RECENT_MAX_AGE, self.spinner, "value", Gio.SettingsBindFlags.DEFAULT)

    def unbind_spinner(self):
        # This should have self.settings.unbind or something.. but unbind is broken via introspection
        # in more than one glib version.  This achieves the same thing (preventing updates to the spinner)
        # by overwriting the .DEFAULT binding with a .GET_NO_CHANGES which only fetches the settings value
        # once at binding time.
        self.settings.bind(GTK_RECENT_MAX_AGE, self.spinner, "value",
                           Gio.SettingsBindFlags.GET | Gio.SettingsBindFlags.GET_NO_CHANGES)

    def on_indefinite_toggled(self, widget, gparam):
        active = widget.get_active()
        cur_val = self.spinner.get_value()

        if active:
            self.revealer.set_reveal_child(False)
            self.unbind_spinner()
            self.settings.set_int(GTK_RECENT_MAX_AGE, -1)
        else:
            self.revealer.set_reveal_child(True)
            if self.settings.get_int(GTK_RECENT_MAX_AGE) < 1:
                if cur_val > 0:
                    self.settings.set_int(GTK_RECENT_MAX_AGE, cur_val)
            self.bind_spinner()
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

Nuts2u
Level 1
Level 1
Posts: 41
Joined: Sun Nov 27, 2011 8:44 pm

Re: Missing access to privacy settings

Post by Nuts2u » Sat Aug 17, 2019 10:06 am

That worked!!!! Thanks for the posted solution.
Silence is golden. Duct tape is silver. Welcome to Hell. Here's your copy of Windows.

nkollek
Level 1
Level 1
Posts: 3
Joined: Mon Aug 12, 2019 9:59 am

Re: Missing access to privacy settings

Post by nkollek » Thu Aug 22, 2019 4:40 am

Your solution worked for me as well.
Thanks a lot.

Post Reply

Return to “Software & Applications”