Code review comment for lp:~bryanfritt/compiz/compiz-decorator_script-edit_1192376

Revision history for this message
BryanFRitt (bryanfritt) wrote :

I've edited/started/done a start-compiz and a start-ccsm script, they export LD_LIBRARY_PATH, and PYTHONPATH, etc...
How can I get them into Compiz?
They would be new files that aren't in there currently, so I have to find and mess with an install script and add them in somehow?
(and/or perhaps Compiz could be made so that these scripts would be optional)

Guess I start a new branch/bug report?

-----

#!/bin/sh

# start-compiz

# Assumes script is in a direct sibdirectory of COMPIZ_PREFIX, like "${COMPIZ_PREFIX}/bin/"
COMPIZ_PREFIX=$(dirname $(cd $(dirname "$0"); pwd))
# If the above isn't correct, it can be commented it out, and the line below edited
#COMPIZ_PREFIX=

#VERBOSE="no"
VERBOSE="yes"
# Echos the arguments if verbose
verbose()
{
 if [ "${VERBOSE}" = "yes" ]; then
  echo "$@"
 fi
}

verbose "COMPIZ_PREFIX=\"${COMPIZ_PREFIX}\""
#export PKG_CONFIG_PATH="${COMPIZ_PREFIX}/lib/pkgconfig:${COMPIZ_PREFIX}/lib64/pkgconfig:${COMPIZ_PREFIX}/lib32/pkgconfig:${PKG_CONFIG_PATH}"
export LD_LIBRARY_PATH="${COMPIZ_PREFIX}/lib:${COMPIZ_PREFIX}/lib64:${COMPIZ_PREFIX}/lib32:${LD_LIBRARY_PATH}"
verbose "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"

if [ -n `which "python2.7"` ]; then
 PYTHONVERSION="2.7"
else
 if [ -n `which "python2.6"` ]; then
  PYTHONVERSION="2.6"
 else
  echo "neither python2.7 nor python2.6 where found"
 fi
fi
verbose "PYTHONVERSION=\"${PYTHONVERSION}\""
if [ -n "${PYTHONVERSION}" ]; then
 #unset PYTHONPATH
 export PYTHONPATH="${COMPIZ_PREFIX}/lib/python${PYTONVERSION}/site-packages:${COMPIZ_PREFIX}/lib64/python${PYTONVERSION}/site-packages:${COMPIZ_PREFIX}/lib32/python${PYTONVERSION}/site-packages::${PYTHONPATH}"
 verbose "PYTHONPATH=\"${PYTHONPATH}\""
fi

# gets rid of plama panels, etc... probably not good
#kquitapp plasma-desktop

verbose "${COMPIZ_PREFIX}/bin/compiz" --replace ccp "$@" &
"${COMPIZ_PREFIX}/bin/compiz" --replace ccp "$@" &

-----

#!/bin/sh

# start-ccsm

# Kill any running instance of ccsm
#pkill -x ccsm

# Assumes script is in a direct subdirectory of $COMPIZ_PREFIX, like "${COMPIZ_PREFIX}/bin/
COMPIZ_PREFIX=$(dirname $(cd $(dirname "$0"); pwd))
# If the above isn't correct, it can be commented it out, and the line below edited
#COMPIZ_PREFIX=

VERBOSE="no"
#VERBOSE="yes"
# Echos the arguments if verbose
verbose()
{
 if [ "${VERBOSE}" = "yes" ]; then
  echo "$@"
 fi
}

verbose "COMPIZ_PREFIX=\"${COMPIZ_PREFIX}\""
export PKG_CONFIG_PATH="${COMPIZ_PREFIX}/lib/pkgconfig:${COMPIZ_PREFIX}/lib64/pkgconfig:${COMPIZ_PREFIX}/lib32/pkgconfig:${PKG_CONFIG_PATH}"
verbose "PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}\""
export LD_LIBRARY_PATH="${COMPIZ_PREFIX}/lib:${COMPIZ_PREFIX}/lib64:${COMPIZ_PREFIX}/lib32:${LD_LIBRARY_PATH}"
verbose "LD_LIBRARY_PATH=\"${LD_LIBRARY_PATH}\""

# with this way somehow in either bash or sh, with this, python editor will start, not the intended result!
#if $(`which "python2.7"` &> /dev/null); then
# export PYTHONPATH="${COMPIZ_PREFIX}/lib/python2.7/site-packages:${COMPIZ_PREFIX}/lib64/python2.7/site-packages:${COMPIZ_PREFIX}/lib32/python2.7/site-packages::${PYTHONPATH}"
#fi
#if $(which python2.6 &> /dev/null); then
# export PYTHONPATH=$COMPIZ_PREFIX/lib/python2.6/site-packages:$COMPIZ_PREFIX/lib64/python2.6/site-packages:$COMPIZ_PREFIX/lib32/python2.6/site-packages::$PYTHONPATH
#fi

if [ -n `which "python2.7"` ]; then
 PYTHON_VERSION="2.7"
else
 if [ -n `which "python2.6"` ]; then
  PYTHON_VERSION="2.6"
 else
  echo "neither python2.7 nor python2.6 where found"
 fi
fi
verbose "PYTHON_VERSION=\"${PYTHON_VERSION}\""
if [ -n "${PYTHON_VERSION}" ]; then
 #unset PYTHONPATH
 export PYTHONPATH="${COMPIZ_PREFIX}/lib/python${PYTHON_VERSION}/site-packages:${COMPIZ_PREFIX}/lib64/python${PYTHON_VERSION}/site-packages:${COMPIZ_PREFIX}/lib32/python${PYTHON_VERSION}/site-packages::${PYTHONPATH}"
 verbose "PYTHONPATH=\"${PYTHONPATH}\""
fi

# Hack to fix ccsm from complaining and causing incorrect plugin config option ordering
rm -rf ~/.cache/compizconfig-1 2&1>/dev/null

"${COMPIZ_PREFIX}/bin/ccsm" &

# copied/modified from other install of Compiz++

« Back to merge proposal