#! /bin/bash session_id=`loginctl list-sessions --no-legend | while read id rest; do loginctl show-session $id; done | grep 'Id=\|Type=' | sed -z 's/\nType=/ /g' | grep wayland | awk -F '[= ]' '{print $2}'` loginctl unlock-session "$session_id"