Comment 5 for bug 1551122

Revision history for this message
Shawn Rutledge (shawn-t-rutledge) wrote :

Updated to 5.5.1+dfsg-14ubuntu3. It's not enough to prevent Plasma from crashing if I disconnect/reconnect both monitors simultaneously with my script.

#!/bin/sh
restore=`unxrandr`
outputs=`xrandr | grep -i "^\\w" | grep connected | cut -d' ' -f1`
alloff="xrandr"
for o in $outputs
do
        alloff="$alloff --output $o --off"
done
echo $alloff
echo $restore
$alloff
sleep 2
$restore

But at least applications tend to survive, and plasma restarts itself.