11

I have a slideshow running on my desktop (which is stored in ~/.local/share/shotwell/wallpaper/wallpaper.xml) and which also is shown in the lock screen.

Since 20.04, there is a blur effect on the current image in the lock-screen.

I only found solutions how to use another image on the lock-screen without blur, but that would remove the slideshow.

How do I remove the blur but keep the slideshow?

3
  • Could you please point to the "solutions how to use another image on the lock-screen without blur?"
    – Sri
    Mar 29, 2021 at 15:13
  • About the bounty. Sri is looking for a more detailed answer to this question: The Gnome maintainer of the relevant code mentions a patch (gitlab.gnome.org/GNOME/gnome-shell/-/issues/2721) to be done in unlockDialog.js for setting sigma value to 0. I am unable to find the JS code in the Gnome resources on my laptop. My Ubuntu version is 20.04.1 LTS and Gnome version is 3.36.8 with X11 Windowing. I do not want to use 3rd party extension.
    – rubo77
    Mar 30, 2021 at 7:07
  • @Sri: I think, I tried this first: askubuntu.com/questions/1227070/… but this did not keep my slideshow
    – rubo77
    Apr 2, 2021 at 20:08

3 Answers 3

12

There is a Extension called Control Blur Effect on Lock Screen..

Control Blur Effect - Gnome Shell Extension

By default the Settings of the Extension make the Blur Sigma Value to 0, This means you can see the wallpaper without any Blur Effect.

Optionally you can Control this value and Brightness value too from the Extension Settings..

enter image description here

7
  • You can open the settings page for the extension with super (=Windows-key) and then enter the word "extension" into the dialog
    – rubo77
    Jun 5, 2020 at 15:25
  • Strange: sometimes I still have a blur effect on the lock screen, sometimes not :-?
    – rubo77
    Jun 21, 2020 at 18:57
  • I too observed when I close the laptop and open after sometime.. suspend action must be disabling the extension..
    – PRATAP
    Jun 21, 2020 at 23:19
  • But that's okay For a Variation, the Blur looks interesting too
    – rubo77
    Jun 22, 2020 at 6:06
  • yours is a desktop or laptop? is it the similar case like suspend or some other thing? Can I reproduce the same with you?
    – PRATAP
    Jun 22, 2020 at 6:12
2

In relation to the bounty and reference to unlockDialog.js not found on system:

The reason why you cant find unlockDialog.js on your system is that is the source code that seems to be compiled by gjs.

What you are asking for is part of a complicated procedure. The way I would look at dealing with this is to download the source code to make the required changes.

  1. Edit the apt sources to add a source for ubuntu source packages
  2. Install gnome-shell source. (apt source gnome-shell)
  3. Change into the gnome-shell directory
    cd /usr/share/gnome-shell/
  4. Edit the files /usr/share/data/org.gnome.shell.gschema.xml.in and /usr/share/js/ui/unlockDialog.js
  5. Add a changelog entry (file /usr/share/debian/changelog) to update the version to higher than what was installed from Ubuntu
  6. Install the build dependancies. These are packages installed and used just to build the package gnome-shell (sudo apt-get build-dep gnome-shell)
  7. Run debuild command to build a package. (Installed via devscripts package)
  8. There should be a .deb file in the parent directory of wherever the gnome-shell directory is.
4
  • This is related to "remove blur effect on lock screen" by patching Gnome source code suggested by the maintainer of that relevant code at Gnome (gitlab.gnome.org/GNOME/gnome-shell/-/issues/2721).
    – Sri
    Mar 30, 2021 at 7:22
  • 1
    In the referenced ticket (gitlab.gnome.org/GNOME/gnome-shell/-/issues/2721) one fix for this was a patch from the author that requires editing two files. (data/org.gnome.shell.gschema.xml.in and js/ui/unlockDialog.js). sri put a bounty for more information requesting information about this. These files are not installed by a package but are compiled into binaries in the gnome-shell package. Therefore fix is to modify source code. Hence this answer. Mar 30, 2021 at 7:23
  • Found the 1st file here: /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.xml. The 2nd file could be extracted with gresource extract /usr/lib/gnome-shell/libgnome-shell.so /org/gnome/shell/ui/unlockDialog.js > unlockDialog.js but the code in the file is not exactly the same as shown in the patch. However, at the beginning of the file, there is a constant declaration: const BLUR_SIGMA = 60;
    – Sri
    Mar 30, 2021 at 18:13
  • @user8169424 It would be more helpful, if you could look at the JS code and suggest steps to recompile the shell with tested commands and statements. Please see example edit in step 3. Refer help on how to include code in the answer.
    – Sri
    Apr 2, 2021 at 14:08
1
+100

The suggested patch seems to add an additional setting that could be managed from somewhere else (supposedly from gsettings?)

Anyhow, since the unlockDialog.js file needs modifying anyways, I opted for a more direct approach: simply disabling the blur effect directly in this file.

The modified file — relying on gnome-shell's gresource overlays feature — can be kept in one's home directory, available for convenient subsequent edits at any time.

Steps to achieve the modification

  1. extract the unlockDialog.js file from the libgnome-shell.so binary library,
  2. establish it as a "gresource overlay", so that gnome-shell will use it in this extracted form,
  3. and then modify the extracted copy a little.

The first two steps are explained in detail here: Where are gnome-shell's UI javascript files on Ubuntu 20.04? (It seems to be a lot to take in, but the actual changes carried out are not very much.)

For the third step, modifying the unlockDialog.js copy, there exist a few different approaches.

The challenge with applying suggested code changes

Now what complicates things is that this file keeps getting changed over time, and depending on which exact version you have, it might get difficult to figure out how to apply any change suggestions.

This is how unlockDialog.js looks now in the gnome-3-36 branch at the time of writing (at commit 6b20eb8e).

The suggested patch however references an older state, since which the file has undergone this and this change; both modify the part about the blur.

With that in mind, I try to suggest the simplest possible changes that seem to have a chance to remain relevant even after some updates.

Ideas for modifying unlockDialog.js

Idea 1:

The simplest solution is changing the BLUR_SIGMA variable's value:

// Old:
// const BLUR_BRIGHTNESS = 0.55;
// const BLUR_SIGMA = 60;

// New:
const BLUR_BRIGHTNESS = 1;
const BLUR_SIGMA = 0;

This will already result in a clear background image that is unaltered and identical to how it looks on the normal desktop after logging in.

(Note that as soon as BLUR_SIGMA is set to 0, BLUR_BRIGHTNESS, even if it's less than 1, will not take effect either; actually, as long as SIGMA is 0, editing BLUR_BRIGHTNESS seems to be probably unnecessary.)

Idea 2:

If you are concerned about performance, you could go for preventing the graphical effect from being applied at all. Seeing however how BLUR_SIGMA = 0 seems to nullify the entirety of the effect, I reckon there is already not much overhead.


// Find this part:
    _updateBackgroundEffects() {
        const themeContext = St.ThemeContext.get_for_stage(global.stage);

// And modify it like this:
    _updateBackgroundEffects() {
        return true;
        const themeContext = St.ThemeContext.get_for_stage(global.stage);

Placing return true; in the _updateBackgroundEffects() method (as the first line, unless you see a reason not to) allows for bypassing code in that method that comes after the return statement.

Before you do this, however, review the contents of the code block, and try to determine whether this method is doing something that later, some other, external methods may try to rely on. If you spot something like that, try to add the return statement after such a declaration. (At the time of writing this, the return statement in the first line (as in the example above) worked without an issue.)

(By the way, you could simply comment out just the effect.set({ ... }); code block as well.)

A note on Idea 2:

I was thinking: "Couldn't we even spare defining the effect in the first place?" So I had my eyes on this line:

        let widget = new St.Widget({
            // ...
            effect: new Shell.BlurEffect({ name: 'blur' }),
        });

But reading the commit message here reveals that removing it could potentially cause bugs; so it seems better to play it safe and leave this line in place.


Also, I'm extremely happy now, because I was incredibly frustrated by the darkened nature of the lock screen background, ever since I installed 20.04.

Now however it's solved for me too.

5
  • I could avoid using the extension with your modus operandi. There still remains one irritant. The login screen still is the purple screen. This blur disabling is effective only for the locked screen not for the logged out screen. I tried to setup a login screen background as suggested here: wiki.archlinux.org/index.php/GDM#Log-in_screen_background_image, but it does not work. That is for Archlinux though. Any idea(s) for Ubuntu?
    – Sri
    Apr 7, 2021 at 3:47
  • 1
    @Sri I can't change either this lock-screen background, neither the "logged-out" (purple) background. This is the closest I have seen people come to changing the lock-screen but I could not follow it (I also did not want an extension for this.), and then I did not even put a big effort into the logged-out background. This, the lock-screen, is definitely gnome-shell realm. The "logged out" screen however is GDM3. They are closely related: GDM3 seems to be a smaller sibling of gnome-shell (even packaged together?), yet is a different thing.
    – Levente
    Apr 7, 2021 at 7:58
  • 1
    These settings were killed off by the gnome-shell dev team, on purpose, following some "strategic discipline". You can still see the remnants of these settings with the dconf-editor app, if you navigate to the org.gnome.desktop.screensaver namespace. But they don't take effect any more. This is how I felt about it before I came across this question.
    – Levente
    Apr 7, 2021 at 8:10
  • 2
    They seem to do their work as if to satisfy a Jira board of tickets, not people. They don't see beyond the Jira board and their IDE window, and seem to prefer it that way. I personally feel it's very sad days for Linux, since Canonical cannot shield Ubuntu users from this any more by providing Unity (also gnome-based somehow, as far as I know) as a "cushion", to soften the experience.
    – Levente
    Apr 7, 2021 at 10:31
  • Am waiting for Ubuntu 21.04 to be out. Then plan to dig deeper to resolve the login background issue. Here's my wonderful background (imgur.com/gallery/d9zLbVq) that I want spanned across my two screens :)
    – Sri
    Apr 7, 2021 at 14:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .