Ask Your Question
1

how do I disable screen shield in gnome 3.16

asked 2015-09-14 02:20:22 -0500

jbodhorn gravatar image

I want to be able to close my laptop and have nothing happen but the screen turn off. When I open the lid I want the screen to turn on... I don't want any locks, passwords, curtains, or anything else, I just want the screen to turn off and on.

I'm running F22 and when I have kodi running and open the lid kodi is frozen, I can't even manage to kill kodi after opening my screen it's that frozen... I'm forced to reboot every time I close my laptop with kodi running.

I guess there used to be two extensions to disable the screen shield, one doesn't seem to exist anymore and the disable screen shield doesn't work for me. Disable screen shield says on github there is a patch to make it work with gnome 3.16 but I don't know how to patch it or if it was was updated and just isn't working for me.

When I first tried disable screen shield the extension said it wasn't compatible with gnome 3.16. I tried what was said in the comments and edited the .json file and the extension said it was compatible and turned on but still didn't work, it didn't do anything and I removed it. I will gladly put it back if someone can help me make it work.

Security is the last thing on my mind atm, I just want my laptop to work... I'm the only person who uses this laptop, it almost never leaves the house, and it's mainly used for entertainment. please someone anyone help... I've been searching for a significant part of the day and haven't been able to find a way around this damn lock screen/screen shield

I already tried: setting the "screen lock" to OFF under gnome setting > Privacy the Disable Screen Shield extension dconf-editor /org/gnome/desktop/lockdown/disable-lock-screen gsettings set org.gnome.desktop.session idle-delay 0

edit retag flag offensive close merge delete

Comments

If it helps you along, the screen lock and suspend settings are two different things. Kodi's behavior on resuming from suspend will probably not be affected by the lock screen. I'd look at how you are providing the storage to the kodi client, and if it's available on resume; or, disable suspend on lid close.

randomuser gravatar imagerandomuser ( 2015-09-14 08:00:31 -0500 )edit

I turn off suspend and hibernate on all my computers, it's one of the first things I do. I've had so much trouble in the past with suspend and hibernate that I don't even bother trying to use them anymore.

jbodhorn gravatar imagejbodhorn ( 2015-09-15 13:10:16 -0500 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2015-09-14 16:21:01 -0500

updated 2015-09-15 03:57:05 -0500

As mentioned @randomuser, your topic goes into several points. The screen shield/screen lock are activated with different components. I had the same needs (without kodi issue) but I changed so many settings that I can't tell you which one works. You've already applied #2.

1/ Disable Switch Lid :

sudo vi /etc/systemd/logind.conf

and uncomment this line : HandleLidSwitch=ignore

2/ Disable Screen Lock

Gnome settings > Privacy > Screen Lock > Off

3/ Disable ScreenSaver Set this to true to lock the screen when the screensaver goes active :

dconf-editor > org.gnome.desktop.screensaver > lock-enable = untick

The number of seconds after screensaver activation before locking the screen :

dconf-editor > org.gnome.desktop.screensaver > lock-delay = 4294967295

4/ Install « Disable screen shield » extension

  • Download the 2 files from https://github.com/lgpasquale/gnome-shell-extension-disable-screenshield/
  • Create the folder and copy to : ~/.local/share/gnome-shell/extensions/disable-screenshield@lgpasquale.com
  • Edit ~/.local/share/gnome-shell/extensions/disable-screenshield@lgpasquale.com/metadata.json and change 3.10 to 3.16. Here is the final file content (metadata.json) :

{"shell-version": ["3.16"], "uuid": "disable-screenshield@lgpasquale.com" , "name": "Disable Screen Shield", "description": "Disable screen shield when screen lock is disabled"}

  • Edit ~/.local/share/gnome-shell/extensions/disable-screenshield@lgpasquale.com/extension.js and change (- means remove the lines, and + add the lines) :
function _onUserBecameActiveInjected()
 {
-    this.idleMonitor.remove_watch(this._becameActiveId);
-    this._becameActiveId = 0;
-
-    let lightboxWasShown = this._longLightbox.shown ||  this._shortLightbox.shown;
-    this._longLightbox.hide();
-    this._shortLightbox.hide();
-
-    // Shortcircuit in case the mouse was moved before the fade completed
-    // or the screen is not locked
-    if (!lightboxWasShown || !this._isLocked)
-    {
-        this.deactivate(false);
-        return;
-    }
+    this._liftShield(true /* onPrimary */, 0 /* velocity */);
+    _onUserBecameActiveOrig.call(this);
 }

Here is the final file content (extension.js) :

const ScreenShield = imports.ui.screenShield;

let _onUserBecameActiveOrig;

function _onUserBecameActiveInjected()
{
   this._liftShield(true /* onPrimary */, 0 /* velocity */);
   _onUserBecameActiveOrig.call(this);
}

function init()
{
}

function enable()
{
    _onUserBecameActiveOrig =
        ScreenShield.ScreenShield.prototype._onUserBecameActive;
    ScreenShield.ScreenShield.prototype._onUserBecameActive =
        _onUserBecameActiveInjected;
}

function disable()
{
    ScreenShield.ScreenShield.prototype._onUserBecameActive =
        _onUserBecameActiveOrig;
}

Source : https://github.com/lgpasquale/gnome-shell-extension-disable-screenshield/issues/2

  • Restart Gnome Shell (Alt-F2, r)
  • Activate the extension : Tweak Tool > Extension > Disable Screen Lock = On

5/ You can try this step too : Enable Alt+Tab in Kodi.

sudo vi ~/.kodi/userdata/advancedsettings.xml (the file doesn't exist by default)

And add these lines :

<advancedsettings>
    <fullscreen>false</fullscreen>
    <alwaysontop>no</alwaysontop>
</advancedsettings>

Let us know if these steps solved your issue.

edit flag offensive delete link more

Comments

in the code that you posted under final content, is that the whole .js files contents? I removed what was in the .js and put in what you posted under final content, it's still not working right

jbodhorn gravatar imagejbodhorn ( 2015-09-14 19:43:41 -0500 )edit

I confirm, it is the whole .js file contents. Did you activate the extension ? In the point #2, once the Screen Lock is turned off, click on it and a new window appears : set to Off, 1hour, Off.

yolo gravatar imageyolo ( 2015-09-15 05:10:58 -0500 )edit

Point two was the first thing I had tried, I had tried that long ago, it just makes it so I don't need a password, the curtain still shows. If I swipe or hit enter the curtain goes away no password is asked for, problem is all the stuff that gets shut off when the curtain is activated.

As for the extension, it shows that it is on, but the curtain still is there every time I open my screen. To get it to be accepted in gnome 3.16 editing the .json file made it turn on, but the curtain was still there. I edited the .js file too(as you have suggested) but with no success curtain shows

jbodhorn gravatar imagejbodhorn ( 2015-09-15 11:47:23 -0500 )edit

Points 1 and 2 I had found before I posted my question here(and here: http://forums.fedoraforum.org/showthr... ), and also the first half of point 3(but not the second half). I had also found the extension and the patch for it, but my editing of the .js file was wrong, but even with proper editing the extension still isn't working.

I'm still not understanding what those advanced settings for kodi do and I have yet to add them, atm my main concern is stopping that screen shield from ever coming up on my laptop

jbodhorn gravatar imagejbodhorn ( 2015-09-15 12:07:43 -0500 )edit

I've just tested with a fresh install in a VM. That works well in applying points #2 & #4. Point #1 is not relevant due to the VM.

It's possible that a setting, you changed, interferes. It's what happens to me. So rename this folder ~/.config/ in ~/.config.old/ for example. Disconnect and reconnect from your Gnome session. A new .config/ folder is created. Apply point #2 and check if the extension is enabled. If the curtain doesn't appear anymore, copy back some folders (.config.old/ to .config/) not related to settings/config stuff.

yolo gravatar imageyolo ( 2015-09-15 13:12:30 -0500 )edit
0

answered 2015-12-29 06:39:41 -0500

cube00 gravatar image

I've added my solution of using DPMS instead in a similar Superuser question.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-09-14 02:20:22 -0500

Seen: 5,844 times

Last updated: Sep 15 '15