https://bugs.kde.org/show_bug.cgi?id=420917

            Bug ID: 420917
           Summary: Looped bash scripts block plasma_session startup
           Product: systemsettings
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: kcm_autostart
          Assignee: mon...@kde.org
          Reporter: alts...@gmail.com
                CC: plasma-b...@kde.org
  Target Milestone: ---

Looped bash scripts blocks plasma_session startup

SUMMARY
I have few looped bash scripts for maintenance tasks (resume paused printers,
mute sound after headphones disconnect). So I placed one of them to
~/.config/plasma-workspace/env/
During next login session didn't start leaving me with a mouse cursor on a
black background.

STEPS TO REPRODUCE
1. On  ~/.config/plasma-workspace/env/ create file test.sh with content

while true; do
    :
done

2. Log out from session
3. Try to login

OBSERVED RESULT
Black background with a mouse cursor. I switched to different tty and htop
showed that process

/bin/sh /usr/lib/x86_64-linux-gnu/libexec/plasma-sourceenv.sh
/home/$USER/.config/plasma-workspace/env/test.sh

loads 100% percent of 1 CPU
After I killed it plasma_session and other services started to load.

Solution for my problem was to push that script into the background (adding "&"
after "done")
done &


EXPECTED RESULT
Looped script doesn't block plasma_session startup

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 20.04
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to