mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 6af3c76fe0d2d60612004f9e19f286a02e2e7bdb
parent 064922e565c05850d6f1ca7f2836ba54ff90d4bd
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Mon,  5 Oct 2015 20:03:11 +0200

fix, check pulse accessibility

Diffstat:
skype | 18+++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/skype b/skype @@ -118,6 +118,22 @@ else fi # now everything is in order + +# check that skype has access to the pulse socket +# and complain otherwise +# TODO can we do better than this? +SOCKET=$(pacmd info | grep 'socket=' | cut -d'=' -f2 | cut -d'>' -f1) +if [ "x$SOCKET" = "x" ]; +then + echo "WARNING: unable to determine pulseaudio socket location" + echo "Continuing nevertheless" +else + $DCMD "ls $SOCKET > /dev/null" || { + echo "WARNING: skype user cannot access the socket $SOCKET" + echo "this may result in sound issues" + echo "continuing nevertheless" + } +fi LISTCMD="pgrep -u skype" # don't hang looking for .Xauthority at the wrong place @@ -145,7 +161,7 @@ start) done echo "session is ready" # give me access to the server - $USER=$(whoami) + USER=$(whoami) $DCMD "DISPLAY=:$DISPLAYNUM xhost +si:localuser:$USER" # give access to the pulseaudio credentials pax11publish -D :$DISPLAYNUM -e