Fix XORG detection.

This commit is contained in:
vermaden 2022-05-24 12:52:32 +02:00
parent ae6cd2ef44
commit 453b42bc88
1 changed files with 5 additions and 6 deletions

View File

@ -167,7 +167,7 @@ then
echo " / / // / // // / // \\\ \ \ \\\ \ \\\ \ \\\ \ \\\ \_ " echo " / / // / // // / // \\\ \ \ \\\ \ \\\ \ \\\ \ \\\ \_ "
echo " \_____\\\____/ \__\\\____//__________\\\__\__\__\\\____/ \_____\\\__\__\\\___\ " echo " \_____\\\____/ \__\\\____//__________\\\__\__\__\\\____/ \_____\\\__\__\\\___\ "
echo echo
echo "automount 1.7.8 2022/05/03" echo "automount 1.7.9 2022/05/24"
exit 0 exit 0
fi fi
@ -713,11 +713,10 @@ case ${2} in
for I in ${GROUP_USERS} for I in ${GROUP_USERS}
do do
[ "${I}" = "root" ] && continue [ "${I}" = "root" ] && continue
DISPLAY_ID=$( procstat pargs $( pgrep Xorg ) | grep "^argv\[1\]:" | awk '{print $NF}' ) XORG_PID=$( pgrep Xorg )
if [ -z "${DISPLAY_ID}" ] [ "${XORG_PID}" = "" ] && continue
then DISPLAY_ID=$( procstat pargs ${XORG_PID} | grep "^argv\[1\]:" | awk '{print $NF}' )
continue [ -z "${DISPLAY_ID}" ] && continue
fi
__log "${DEV}: starting '${FM}' file manager" __log "${DEV}: starting '${FM}' file manager"
su -l "${I}" -c "env DISPLAY=${DISPLAY_ID} ${FM} ${MNT} &" 1> /dev/null 2>&1 su -l "${I}" -c "env DISPLAY=${DISPLAY_ID} ${FM} ${MNT} &" 1> /dev/null 2>&1
done done