Screenager n00b
Joined: 26 Nov 2023 Posts: 37
|
Posted: Mon Jan 15, 2024 12:49 am Post subject: acpi event screen rotation under kde wayland problem |
|
|
Hello,
I want to auto rotate the screen on my convertible thinkpad, the events trigger and KDE even switches to touchmode (bigger icons) by itself. So I wrote a script like on this wiki page, I guess I need to run kscreen-doctor from a root shell context in this script and I can't get it to work: It only works when run as the user that is logged in the desktop.
Code: | su -c "kscreen-doctor output.1.rotation.left" screenager | produces Code: | Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :1
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: minimal, offscreen, wayland-egl, wayland, xcb.
Aborted
|
trying to run it as root produces an error of missing XDG_RUNTIME_DIR and if I specify it:
Code: | XDG_RUNTIME_DIR="/run/user/1000" kscreen-doctor output.LVDS-1.rotation.left | I only get:
Code: | QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 1000
kscreen.doctor: setop exec returned KScreen::Config(
KScreen::Output(33, "LVDS-1", connected enabled priority 1, pos: QPoint(0,0), res: QSize(1366, 768), modeId: "35", scale: 1, clone: no, rotation: KScreen::Output::Left, followPreferredMode: false) )
|
I can only find scripts and workarounds for X.org but nothing for wayland. I am probably only missing one or two extra env vars... |
|