<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body dir="auto"><div dir="auto">Hi,</div><div dir="auto"><br></div>already done so 10 months ago: https://gitlab.xfce.org/panel-plugins/xfce4-sensors-plugin/-/commit/b515a128131d9c24aeab919ed7fd31adda9c2e38 (thanks to Gaël).<div dir="auto"><br></div><div dir="auto">It depends on your distro and update path / release to incorporate a newer version in your system.</div><div dir="auto"><br></div><div dir="auto">HTH</div><div dir="auto"><br></div><div dir="auto">Fabian</div><div><br></div><div align="left" dir="auto" style="font-size:100%;color:#000000"><div>-------- Ursprüngliche Nachricht --------</div><div>Von: Markus Giese <spreetec@googlemail.com> </div><div>Datum: 08.08.26 15:37 (GMT+01:00) </div><div>An: timystery@arcor.de, corsac@debian.org, xfce4-dev@xfce.org </div><div>Betreff: Bug report: xfce4-sensors-plugin pollutes panel $CWD with relative chdir() in Wayland session </div><div><br></div></div><div dir="ltr"><div>Hi guys,</div><div><br></div><div>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.</div><div><br></div><div>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. </div><div><br></div><div>The plugin changes the entire xfce4-panel process's working directory to "/sys/class/power_supply" and leaves it stuck there. </div><div>This causes any application spawned by the panel to inherit this incorrect path. </div><div>I ran an strace on the panel process during a manual refresh (`xfce4-panel -r`).</div><div><br></div><div>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 </div><div><br></div><div><br></div><div>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()? </div><div><br></div><div><br></div><div></div><div>Even the file browser starts in "/sys/class/power_supply" directory as well as all other users terminals. </div><div><br></div><div>Thank you!</div></div>
</body></html>