question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

global.screen is undefined error on gnome-shell 3.30 (running on antergos)

See original GitHub issue

I’ve just upgraded my antergos station and now pixel saver no longer works

Running lg shows:

Type Error: global.screen is undefined.

and this is the result of journalctl

$ journalctl -f /usr/bin/gnome-shell
-- Logs begin at Wed 2018-09-12 09:51:02 -03. --
sep 19 01:38:45 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:38:45 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:38:54 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:39:02 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:40:28 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:40:38 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:41:10 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:41:10 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:41:10 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:43:27 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:44:00 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13
sep 19 01:44:07 antergos gnome-shell[750]: JS ERROR: TypeError: global.screen is undefined
                                           getWindow@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/util.js:9:1
                                           updateVisibility@/home/sas/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/buttons.js:209:13

Some more info:

$ uname -a
Linux antergos 4.18.8-arch1-1-ARCH #1 SMP PREEMPT Sat Sep 15 20:34:48 UTC 2018 x86_64 GNU/Linux

$ gnome-shell --version
GNOME Shell 3.30.0

There seem to be several extensions facing similar issues:

https://github.com/zakkak/workspace-grid/issues/86 https://github.com/home-sweet-gnome/dash-to-panel/issues/434 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905107 https://github.com/codito/gnome-pomodoro/issues/365 https://github.com/mlutfy/hidetopbar/pull/163 https://github.com/mlutfy/hidetopbar/issues/162

it seems like global.screen is now globa.display

+        if (global.screen)
+            stackingManager = global.screen;    // mutter < 3.29
+        else
+            stackingManager = global.display;   // mutter >= 3.29

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

19reactions
opensascommented, Sep 20, 2018

I saw the following comment on the [extension page}(https://extensions.gnome.org/extension/723/pixel-saver/):

to make it work on Gnome 3.30 (and ubuntu 18.10 probably) :

  • edit$HOME/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/utils.js
  • edit$HOME/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/decorations.js replace global.screen by global.workspace_manager everywhere
  • alt f2 r to restart gnome.

The fix works ok, perhaps you could add it to the extension

0reactions
tallerocommented, Apr 9, 2019

@SpaceboyRoss01 The version from this repo works without problems on GNOME 3.30.

Read more comments on GitHub >

github_iconTop Results From Across the Web

global.screen is undefined error on gnome-shell 3.30 (running on ...
I've just upgraded my antergos station and now pixel saver no longer works. Running lg shows: Type Error: global.screen is undefined.
Read more >
[workspace-indicator] TypeError: global.screen is undefined
Extension "workspace-indicator@gnome-shell-extensions.gcampax.github.com" had error on Fedora 29: TypeError: global.screen is undefined.
Read more >
[SOLVED]"systemctl suspend" = gnome session crash
I have a Acer notebook and when i sended the command "systemctl suspend" the system has suspended, but when i turn on (...
Read more >
Instance - Vulkan Tutorial
This next struct is not optional and tells the Vulkan driver which global extensions and validation layers we want to use. Global here...
Read more >
System freezes randomly while browsing - Manjaro Linux Forum
The screen becomes unresponsive for a couple of seconds and then I ... wm: gnome-shell dm: GDM 41.3 Distro: Manjaro Linux base: Arch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found