You are not logged in.
I'm trying to start a script to change the Plasma theme using a systemd timer, that starts on boot and runs every 5 minutes. The timer is already running as user, I added a bunch of environment variables and specified the plasma-workspace.target, but the timer always crashes on boot.
Here are the unit files: https://git.dataprolet.de/dataprolet/Pl … e-Switcher.
I also tried adding:
Environment=XAUTHORITY=/home/user/.Xauthority
Environment=QT_QPA_PLATFORM=xcbThis is the error from 'systemctl --user status theme-switcher.service':
Mai 27 21:52:17 Desktop bash[1868]: Invalid MIT-MAGIC-COOKIE-1 key
Mai 27 21:52:17 Desktop plasma-apply-colorscheme[1868]: qt.qpa.xcb: could not conn
ect to display :0
Mai 27 21:52:17 Desktop plasma-apply-colorscheme[1868]: qt.qpa.plugin: From 6.5.0,
xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
Mai 27 21:52:17 Desktop plasma-apply-colorscheme[1868]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in
"" even though it was found.
Mai 27 21:52:17 Desktop plasma-apply-colorscheme[1868]: This application failed to start becau
se no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minima
l, minimalegl, offscreen, vkkhrdisplay, vnc, xcb, wayland-egl, wayland.
Mai 27 21:52:17 Desktop systemd-coredump[1898]: [?] Process 1868 (plasma-ap
ply-co) of user 1000 dumped core.
Stack trace of thread 1868:
#0 0x00007a59682a8e44 n/a (libc.so.6 + 0x94e44)
#1 0x00007a5968250a30 raise (libc.so.6 + 0x3ca30)
#2 0x00007a59682384c3 abort (libc.so.6 + 0x244c3)
#3 0x00007a596888c91d n/a (libQt6Core.so.6 + 0x8c91d)
#4 0x00007a596888d115 _ZNK14QMessageLogger5fatalEPKcz (libQt6
Core.so.6 + 0x8d115)
#5 0x00007a59690daadd n/a (libQt6Gui.so.6 + 0xdaadd)
#6 0x00007a59691896c8 _ZN22QGuiApplicationPrivate21createEven
tDispatcherEv (libQt6Gui.so.6 + 0x1896c8)
#7 0x00007a5968950fc5 _ZN23QCoreApplicationPrivate4initEv (li
bQt6Core.so.6 + 0x150fc5)
#8 0x00007a596918975e _ZN22QGuiApplicationPrivate4initEv (lib
Qt6Gui.so.6 + 0x18975e)
#9 0x00007a59691821b1 _ZN15QGuiApplicationC2ERiPPci (libQt6Gu
i.so.6 + 0x1821b1)
#10 0x000058c1dc046198 n/a (plasma-apply-colorscheme + 0x8198)
#11 0x00007a5968239c88 n/a (libc.so.6 + 0x25c88)
#12 0x00007a5968239d4c __libc_start_main (libc.so.6 + 0x25d4c)
#13 0x000058c1dc047ba5 n/a (plasma-apply-colorscheme + 0x9ba5)
Stack trace of thread 1891:
#0 0x00007a596831c39d __poll (libc.so.6 + 0x10839d)
#1 0x00007a5968036615 n/a (libglib-2.0.so.0 + 0xdc615)
#2 0x00007a5967fbfd55 g_main_context_iteration (libglib-2.0.s
o.0 + 0x65d55)
#3 0x00007a5968bcde1d _ZN20QEventDispatcherGlib13processEvent
sE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x3cde1d)
#4 0x00007a596895738e _ZN10QEventLoop4execE6QFlagsINS_17Proce
ssEventsFlagEE (libQt6Core.so.6 + 0x15738e)
#5 0x00007a5968a54bb0 _ZN7QThread4execEv (libQt6Core.so.6 + 0
x254bb0)
#6 0x00007a5969929f7e n/a (libQt6DBus.so.6 + 0x2df7e)
#7 0x00007a5968ae4a27 n/a (libQt6Core.so.6 + 0x2e4a27)
#8 0x00007a59682a6ded n/a (libc.so.6 + 0x92ded)
#9 0x00007a596832a0dc n/a (libc.so.6 + 0x1160dc)
ELF object binary architecture: AMD x86-64
Mai 27 21:52:17 Desktop systemd[1842]: theme-switcher.service: Main process exited, code=exite
d, status=134/n/a
Mai 27 21:52:17 Desktop systemd[1842]: theme-switcher.service: Failed with result
'exit-code'.Offline
I googled for "Invalid MIT-MAGIC-COOKIE-1 key", which yielded this thread: https://unix.stackexchange.com/question … m-remotely. It doesn't sound like your exact problem, but might give you some ideas.
Are you sure :0 is correct? Does the script work from, say, a TTY?
EDIT: I also found this: https://github.com/systemd/systemd/blob/v219/NEWS#L194
Last edited by Awebb (2024-05-28 08:50:30)
Offline
Plasma likely also means SDDM and SDDM doesn't store XAUTHORITY in the default location.
https://gist.github.com/AladW/de1c5676d93d05a5a0e1 - you obviously don't want to import the environment from xinit, but eg. kwin_x11 ![]()
Offline
Thanks, I ended up adding the script to the autostart, which is a lot more reliable.
Offline
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline