12

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?

pomsky
  • 70,557
rubo77
  • 34,024
  • 52
  • 172
  • 299

3 Answers3

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

3

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.
αғsнιη
  • 36,350
1

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.

Levente
  • 4,607