From 8ff3d781f5143aa1133cea68f2f0330b9e4fcef5 Mon Sep 17 00:00:00 2001 From: chengsiyuan Date: Tue, 2 Jan 2024 16:08:39 +0800 Subject: [PATCH] only fix 615 KDE freezing. --- bpo4/615/acosail_bpo4_only_fixkde_240102.sh | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 bpo4/615/acosail_bpo4_only_fixkde_240102.sh diff --git a/bpo4/615/acosail_bpo4_only_fixkde_240102.sh b/bpo4/615/acosail_bpo4_only_fixkde_240102.sh new file mode 100644 index 0000000..ce18fc0 --- /dev/null +++ b/bpo4/615/acosail_bpo4_only_fixkde_240102.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +current_uid=$(id -u) + +if [ "$current_uid" -eq 0 ]; then + echo "please run as a normal user" + exit 1 +fi + +tab=$'\t' + +kde_conf="${HOME}/.config/kwinrc" +if [ -e "$kde_conf" ]; then + true +else + echo "file $kde_conf not exist" + exit 1 +fi + +confline_Xrander="Backend=XRender" +sed -in "/\[Compositing\]/,/^$/{/^[[:space:]]*Backend=/{d}}" ${kde_conf} +sed -in "/\[Compositing\]/a\\${confline_Xrander}" ${kde_conf} + +echo "all changes have been made, please reboot to take effect"