CODE
#!/bin/sh
# skype won't work over NFS, even with symlinks ... here's a workaround
# copyright (c) 2006 by Adam Katz for Integrated Computer Solutions, Inc.
# released under the MIT License
# add to /usr/local/bin/skype
# chmod +x
# for staticly installed skype, we need these three lines:
#IAM=`which $0 2>/dev/null || echo $0`
#export SKYPE_RESOURCES_PATH="$(dirname $(dirname $IAM))/share/skype"
#SKYPE=$SKYPE_RESOURCES_PATH/skype
SKYPE=/usr/bin/skype
[ -z "$LOGNAME" ] && LOGNAME=$USER
[ -z "$LOGNAME" ] && LOGNAME=`whoami`
# if this is sourced, make sure oldhome persists
export OLDHOME="$HOME"
SDIR="/tmp/skype-$LOGNAME"
NFS="$OLDHOME/.skype-nfs"
# if we already have SDIR and it's newer than the backup, update the backup
if [ -d "$SDIR/.Skype" ] && [ "$SDIR/.Skype" -nt "$NFS" ]; then
rm -rf "$NFS"
cp -rp "$SDIR/.Skype" "$NFS"
# otherwise, populate SDIR from the backup (if it exists)
elif [ -d "$NFS" ]; then
rm -rf "$SDIR/.Skype"
cp -rp "$NFS" "$SDIR/.Skype"
fi
if ! (mkdir -p $SDIR && touch $SDIR/fake_home_for_skype-nfs_bug 2>/dev/null)
then
echo Write access denied to $SDIR, not launching skype >&2
exit 1
fi
mkdir -p $SDIR/.qt $SDIR/.Skype $NFS
HOME="$SDIR" "$SKYPE" "$@"
RETVAL=$?
# update the backup unless it's been updated already (like by another machine)
if [ "$SDIR/.Skype" -nt "$NFS" ]; then
rm -rf "$NFS"
cp -rp "$SDIR/.Skype" "$NFS"
fi
# return the same value as skype did
exit $RETVAL
# skype won't work over NFS, even with symlinks ... here's a workaround
# copyright (c) 2006 by Adam Katz for Integrated Computer Solutions, Inc.
# released under the MIT License
# add to /usr/local/bin/skype
# chmod +x
# for staticly installed skype, we need these three lines:
#IAM=`which $0 2>/dev/null || echo $0`
#export SKYPE_RESOURCES_PATH="$(dirname $(dirname $IAM))/share/skype"
#SKYPE=$SKYPE_RESOURCES_PATH/skype
SKYPE=/usr/bin/skype
[ -z "$LOGNAME" ] && LOGNAME=$USER
[ -z "$LOGNAME" ] && LOGNAME=`whoami`
# if this is sourced, make sure oldhome persists
export OLDHOME="$HOME"
SDIR="/tmp/skype-$LOGNAME"
NFS="$OLDHOME/.skype-nfs"
# if we already have SDIR and it's newer than the backup, update the backup
if [ -d "$SDIR/.Skype" ] && [ "$SDIR/.Skype" -nt "$NFS" ]; then
rm -rf "$NFS"
cp -rp "$SDIR/.Skype" "$NFS"
# otherwise, populate SDIR from the backup (if it exists)
elif [ -d "$NFS" ]; then
rm -rf "$SDIR/.Skype"
cp -rp "$NFS" "$SDIR/.Skype"
fi
if ! (mkdir -p $SDIR && touch $SDIR/fake_home_for_skype-nfs_bug 2>/dev/null)
then
echo Write access denied to $SDIR, not launching skype >&2
exit 1
fi
mkdir -p $SDIR/.qt $SDIR/.Skype $NFS
HOME="$SDIR" "$SKYPE" "$@"
RETVAL=$?
# update the backup unless it's been updated already (like by another machine)
if [ "$SDIR/.Skype" -nt "$NFS" ]; then
rm -rf "$NFS"
cp -rp "$SDIR/.Skype" "$NFS"
fi
# return the same value as skype did
exit $RETVAL
Does anyone have a viable solution to this?