Remove Red Borders Around the Screen | Cinnamon Desktop Zoom

I do not know whether this is a feature but regardless, I need to disable it. When I use screen magnifier built-in to cinnamon, a thin red border appears around the screen. There is no way of me using the system without screen magnifier or use another DE. The borders are especially apparent in dark UI and it is so distracting. How can I get rid of these borders?

I logged into Cinnamon to see if there was a way to turn it off or change the colors in the settings, even tried dconf-editor, but if it can be modified, it’s not a user-facing setting.

The only setting that removes it from around the screen is “Lens mode”, but if having it around the screen is distracting, then Lens mode would probably be worse for you.

Will check to see if I can find the code itself and leave an update.

Here’s dconf-editor for reference. The color-related settings don’t seem to do anything, unfortunately.


Thanks for looking through, I asked in Linux Mint discord and they were ignorant and very disrespectful about it. It is such a disappointment to be treated like this from devs of cinnamon.

I doubt they were intentionally disrespectful. It’s just not something they have worked on, and they are a team that has taken on what is considered too many projects, so they are kind of stretching themselves thin.


As far as options are concerned, the magnifier/zoom settings are written in Python. This is great if you know how to code in Python. Otherwise, it’s useless info.

Here’s the code found in “/usr/share/cinnamon/cinnamon-settings/modules/__pycache__/cs_accessibility.cpython-312.pyc”

# Desktop Zoom

            settings = page.add_section(_("Desktop Zoom"))

            switch = GSettingsSwitch(_("Enable zoom"), "org.cinnamon.desktop.a11y.applications", "screen-magnifier-enabled")
            settings.add_row(switch)

            spin = GSettingsSpinButton(_("Magnification"), "org.cinnamon.desktop.a11y.magnifier", "mag-factor", None, 1.0, 15.0, step=0.5)
            settings.add_reveal_row(spin, "org.cinnamon.desktop.a11y.applications", "screen-magnifier-enabled")

            zoom_key_options = [["", _("Disabled")], ["<Alt>", "<Alt>"],["<Super>", "<Super>"],["<Control>", "<Control>"], ["<Shift>", "<Shift>"]]
            widget = GSettingsComboBox(_("Mouse wheel modifier"), "org.cinnamon.desktop.wm.preferences", "mouse-button-zoom-modifier", zoom_key_options)
            widget.set_tooltip_text(_("While this modifier is pressed, mouse scrolling will increase or decrease zoom."))
            settings.add_reveal_row(widget, "org.cinnamon.desktop.a11y.applications", "screen-magnifier-enabled")

            switch = GSettingsSwitch(_("Scroll at screen edges"), "org.cinnamon.desktop.a11y.magnifier", "scroll-at-edges")
            settings.add_reveal_row(switch, "org.cinnamon.desktop.a11y.applications", "screen-magnifier-enabled")

            mouse_track_options = [["centered",     _("Keep cursor centered")],
                                   ["proportional", _("Cursor moves with contents")],
                                   ["push",         _("Cursor pushes contents around")]]

            widget = GSettingsComboBox(_("Mouse tracking mode"), "org.cinnamon.desktop.a11y.magnifier", "mouse-tracking", mouse_track_options)
            settings.add_reveal_row(widget, "org.cinnamon.desktop.a11y.applications", "screen-magnifier-enabled")

            switch = GSettingsSwitch(_("Lens mode"), "org.cinnamon.desktop.a11y.magnifier", "lens-mode")
            settings.add_reveal_row(switch, "org.cinnamon.desktop.a11y.applications", "screen-magnifier-enabled")

            self.zoom_stack = SettingsStack()
            self.zoom_stack.set_transition_type(Gtk.StackTransitionType.CROSSFADE)

            lens_shape_options = [["square",          _("Square")],
                                  ["horizontal",      _("Horizontal strip")],
                                  ["vertical",        _("Vertical strip")]]

            widget = GSettingsComboBox(_("Lens shape"), "org.cinnamon.desktop.a11y.magnifier", "lens-shape", lens_shape_options)
            self.zoom_stack.add_named(widget, "shape")

            screen_pos_options = [["full-screen",     _("Full screen")],
                                  ["top-half",        _("Top half")],
                                  ["bottom-half",     _("Bottom half")],
                                  ["left-half",       _("Left half")],
                                  ["right-half",      _("Right half")]]

            widget = GSettingsComboBox(_("Screen position"), "org.cinnamon.desktop.a11y.magnifier", "screen-position", screen_pos_options)
            self.zoom_stack.add_named(widget, "screen")

            settings.add_reveal_row(self.zoom_stack, "org.cinnamon.desktop.a11y.applications", "screen-magnifier-enabled")

            self.mag_settings.bind_with_mapping("lens-mode",
                                                self.zoom_stack, "visible-child-name",
                                                Gio.SettingsBindFlags.GET,
                                                self.zoom_stack_get,
                                                None)

            if self.mag_settings.get_boolean("lens-mode"):
                self.zoom_stack.set_visible_child_name("shape")
            else:
                self.zoom_stack.set_visible_child_name("screen")

Theoretically (and/or practically), someone with the right skills could implement a feature that controls the borders’ visibility and color.

In dconf-editor there is a setting which allows you to turn on cross-hairs. It’s a GTK feature, so it works for Cinnamon and Gnome. It also allows you to change its thickness and color. This could be used as a base for implementing a feature that affects the zoom borders.

The feature is tied to the zoom feature, but doesn’t currently show in Cinnamon settings.

However, Cinnamon hasn’t added or re-added this feature to their recent versions. So, it would take a good number of requests for them to implement it by default, or for an external developer to push the code to their repo.



Anyway, this is where my “skill set” stops. I think the fact that the cross-hair feature only works if the zoom feature is turned on is an indication that it either was part of Cinnamon before or is planned.

Hopefully, the right eyes see this and is able to implement it.

Can I do anything to remove these borders through dconf or another way without modifying source code?

Not from what I can see/find.

EDIT:

Just checked the AUR: https://aur.archlinux.org/packages?O=0&K=zoom

You may be able to install an additional package that works the way you want.
This one maybe? https://aur.archlinux.org/packages/xzoom

You can try these too: https://aur.archlinux.org/packages?O=0&K=magnif

Are these other magnifier options? I am kinda hesitant to try them; because, they seem to not be that integrated with the DE and input handling.

You’ll have to read through their descriptions and see if they are a good fit for you. Once you find something, try it out. If you don’t like it, uninstall it.

There’s also https://archlinux.org/packages/extra/x86_64/kmag/

I don’t like it, but I don’t need this software, so I don’t know what a person who does would want. You can try it. It opens in a window, so it’s not very intuitive in my opinion. But, since it’s made by KDE, it probably has many features you can tweak to your liking.

It’s not to find in the code, it’s to find (and change) in the used theme.
You can copy your used theme to a new folder in your $HOME to prevent it from automatic updates and change it to something you prefer.

  • create a new folder named .themes in your ~/
  • copy your prefered theme into it
  • rename your new theme, maybe add your username to it (to find it later)
  • open your custom theme with a text-editor
  • search for “magnif”
  • change the value for “border” from 2px to 0px
  • save your theme
  • open your settings / themes and choose your custom settings (therefore is the own name)

Edit, thanks to @ddnn :

  • You must logout/login or switch to another theme and back to your edited theme to apply the changes

ready

Example from my ~/themes/Mint-Y-Dark-Orange-omig/cinnamon/cinnamon.css in line 1061ff:

.magnifier-zoom-region {
  border: 0px solid maroon; }
  .magnifier-zoom-region .full-screen {
    border-width: 0px; }

Edit: corrected searchword.

1 Like

I can confirm that this works. However, I needed to log out and log back in (or reload Cinnamon) for it to work. This is possibly because my current theme was already in my .themes folder, but just in case, please add this step to your solution.

Great find! :grin:

1 Like

If you change something in this theme, you can change to a different them and then back to your theme, that should work too.

I tried. It didn’t work for some reason, which is why I said “just in case”.

1 Like

It worked! @Omig you are a legand, thanks.

2 Likes

Great!

Under @Omig’s post with the solution, you should see a button aptly named “Solution”.
Please click it so any other users who have a similar query can find the solution easily.

It should look like one of the examples below.


image image

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.