3

I installed Xubuntu 24.04 from Xubuntu 22, but after installing caffeine (keeps desktop from locking) and trying to run the app it fails with following warning:

/usr/bin/caffeine:24: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources

I did skim over the details provided at the page referenced in the failed-to-run warning, but it appears the details are geared toward developers.

Caffeine ran fine in Xubuntu 22, so any ideas what I might be able to do to get it working in XXubuntuubu 24 ?

3 Answers3

2

If you are running gnome, an alternative to caffeine (debian package) is caffeine (gnome extension). See the github link for screenshots:

https://extensions.gnome.org/extension/517/caffeine/

https://github.com/eonpatapon/gnome-shell-extension-caffeine

jpb
  • 194
0

It seems that the development of Caffeine has stopped for several years. A workaround is to use Stimulator.

image

You can install it from Flathub. Open a terminal and enter the commands one by one.

sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install flathub io.github.sigmasd.stimulator
0

I have a hot-key ( Whisker Menu > Keyboard > Application Shortcuts ) on my laptop bound to a script that toggles presentation mode ( Panel > Power Manager Plugin ):

Presentation Mode toggle

At some point after I upgraded to 24.04 I noticed it had stopped working. However, a few tweaks seem to have fixed it:

#!/bin/bash

notify(){ # cf. https://github.com/vlevit/notify-send.sh/blob/v0.2/notify-send.sh notify-send.sh -R /tmp/presentation-mode "$1" }

pmode(){ xfconf-query -c xfce4-power-manager
-p /xfce4-power-manager/presentation-mode "$@" }

case $(pmode) in true) pmode -s false xset s 600 600 xset s blank xset s on xset dpms 120 300 600 xset +dpms notify "Presentation mode disabled" ;; false|*) pmode -s true xset s 0 0 xset s noblank xset s reset xset s off xset dpms 0 0 0 xset dpms force on xset -dpms notify "Presentation mode enabled" ;; esac

Some of the xset commands may be unnecessary.

jhnc
  • 163