I am running 15.4 on LXQT
I installed Caffeine from the openSuse software search site. here. It is supposed to reside in the system tray, but is not there. It is also not in the menu, nor can it be started via the terminal as user or root.
User terminal errors:
caffeine
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key/usr/bin/caffeine:25: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version(‘Gtk’, ‘3.0’) before import to ensure that the right version gets loaded.
from gi.repository import GObject, Gtk, GLib
Traceback (most recent call last):
File “/usr/bin/caffeine”, line 36, in
ewmh = EWMH()
File “/usr/lib/python3.6/site-packages/ewmh.py”, line 50, in init
self.display = _display or display.Display()
File “/usr/lib/python3.6/site-packages/Xlib/display.py”, line 89, in init
self.display = _BaseDisplay(display)
File “/usr/lib/python3.6/site-packages/Xlib/display.py”, line 71, in init
protocol_display.Display.init(self, *args, **keys)
File “/usr/lib/python3.6/site-packages/Xlib/protocol/display.py”, line 166, in init
raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can’t connect to display “:0”: b’Invalid MIT-MAGIC-COOKIE-1 key’
Root (su) terminal errors:
# caffeine
No protocol specified
No protocol specified
/usr/bin/caffeine:25: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version(‘Gtk’, ‘3.0’) before import to ensure that the right version gets loaded.
from gi.repository import GObject, Gtk, GLib
Traceback (most recent call last):
File “/usr/bin/caffeine”, line 36, in
ewmh = EWMH()
File “/usr/lib/python3.6/site-packages/ewmh.py”, line 50, in init
self.display = _display or display.Display()
File “/usr/lib/python3.6/site-packages/Xlib/display.py”, line 89, in init
self.display = _BaseDisplay(display)
File “/usr/lib/python3.6/site-packages/Xlib/display.py”, line 71, in init
protocol_display.Display.init(self, *args, **keys)
File “/usr/lib/python3.6/site-packages/Xlib/protocol/display.py”, line 166, in init
raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can’t connect to display “:0”: b’No protocol specified\n’
# caffeine --version
No protocol specified
No protocol specified
/usr/bin/caffeine:25: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version(‘Gtk’, ‘3.0’) before import to ensure that the right version gets loaded.
from gi.repository import GObject, Gtk, GLib
caffeine 2.8.3
# caffeine --help
No protocol specified
No protocol specified
/usr/bin/caffeine:25: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version(‘Gtk’, ‘3.0’) before import to ensure that the right version gets loaded.
from gi.repository import GObject, Gtk, GLib
usage: caffeine [-h] [-V]Prevent desktop idleness in full-screen mode
optional arguments:
-h, --help show this help message and exit
-V, --version show program’s version number and exit
Searched existing topics, here which suggested:
Hi, here is solution which helped me:
I run in konsole this patch - “sudo zypper in python-xdg”, and my caffeine running now.
Was able to locate it in the software search here, but I don’t want to screw up my system so am asking the forum if this is safe first.
Thank you for any help available.