Bug report: xfce4-sensors-plugin pollutes panel $CWD with relative chdir() in Wayland session

Fabian Nowak timystery at arcor.de
Sun Aug 9 11:25:46 CEST 2026


Hi,already done so 10 months ago: https://gitlab.xfce.org/panel-plugins/xfce4-sensors-plugin/-/commit/b515a128131d9c24aeab919ed7fd31adda9c2e38 (thanks to Gaël).It depends on your distro and update path / release to incorporate a newer version in your system.HTHFabian
-------- Ursprüngliche Nachricht --------Von: Markus Giese <spreetec at googlemail.com> Datum: 08.08.26  15:37  (GMT+01:00) An: timystery at arcor.de, corsac at debian.org, xfce4-dev at xfce.org Betreff: Bug report: xfce4-sensors-plugin pollutes panel $CWD with relative chdir() in Wayland session Hi guys,thank you for your time in the XFCE4 project. I really love this DE for years. Now I found a serious issue. And I am too lazy to create an account and submit a regular bug report. That's why I am writing to all 3 of you at once.I am writing to report a critical bug in the xfce4-sensors-plugin (or related Xfce panel power components) that breaks the global working directory ($CWD) of the user session under XFCE Wayland session. The plugin changes the entire xfce4-panel process's working directory to "/sys/class/power_supply" and leaves it stuck there. This causes any application spawned by the panel to inherit this incorrect path. I ran an strace on the panel process during a manual refresh (`xfce4-panel -r`).The output clearly shows that the plugin performs relative chdir() calls without saving and restoring the original directory context afterwards:

4485  chdir("/sys/class/")              = 0
4485  chdir("power_supply")             = 0
4485  chdir("/sys/class/")              = 0
4485  chdir("thermal")                  = 0
4485  chdir("/proc/acpi")               = 0
4485  chdir("fan")                      = "-1" ENOENT (No such file or directory)
4485  chdir("/sys/class/")              = 0
4485  chdir("power_supply")             = 0 Because these calls happen within the panel's process/thread context, the relative pathing gets confused and the panel gets stuck inside "/sys/class/power_supply".

Could you please fix the C code of the plugin to either use absolute paths for these sysfs/procfs checks, or properly back up and restore the original CWD using fchdir()? Even the file browser starts in "/sys/class/power_supply" directory as well as all other users terminals. Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce4-dev/attachments/20260809/52eb5ed3/attachment.htm>


More information about the Xfce4-dev mailing list