eb874011f3
Fix tty names, cmd arguments... Install the stop/restart scripts. Remove policykit support for now.
18 lines
334 B
Bash
18 lines
334 B
Bash
#!/bin/sh
|
|
|
|
SED="/usr/bin/sed"
|
|
CAT="/bin/cat"
|
|
|
|
dispnum=0
|
|
if [ ! -z "${DISPLAY}" ]; then
|
|
dispnum=$(echo ${DISPLAY} | ${SED} -E -e 's|:([0-9]+).*|\1|')
|
|
fi
|
|
|
|
if [ ! -f "/tmp/.X${dispnum}-lock" ]; then
|
|
echo "ERROR: Failed to find X lock file for display ${dispnum}"
|
|
exit 1
|
|
fi
|
|
pid=$(${CAT} "/tmp/.X${dispnum}-lock")
|
|
|
|
echo ${pid}
|