Jump to content

Special:Badtitle/NS90:Talk:Kdenlive/Development/KF5/Make sure to set env variables correctly for home dir-based setups: Difference between revisions

From KDE Community Wiki
TheDiveO (talk | contribs)
m New thread: Make sure to set env variables correctly for home dir-based setups
 
TheDiveO (talk | contribs)
mNo edit summary
Line 8: Line 8:
SCRIPT_PATH=$(dirname "$SCRIPT_NAME")
SCRIPT_PATH=$(dirname "$SCRIPT_NAME")
export INSTALL_PREFIX=$(dirname "$SCRIPT_PATH")
export INSTALL_PREFIX=$(dirname "$SCRIPT_PATH")
export LD_LIBRARY_PATH=$INSTALL_PREFIX/lib
export XDG_DATA_DIRS=$INSTALL_PREFIX/share:$XDG_DATA_DIRS:/usr/share
export XDG_DATA_DIRS=$INSTALL_PREFIX/share:$XDG_DATA_DIRS:/usr/share
echo "Environment set up for $INSTALL_PREFIX"
echo "Environment set up for $INSTALL_PREFIX"
$INSTALL_PREFIX/bin/kdenlive
$INSTALL_PREFIX/bin/kdenlive
</pre>
</pre>
Edit: added missing LD_LIBRARY_PATH setting

Revision as of 15:34, 22 October 2015

It is important to have especially the environment variable XDG_DATA_DIRS correctly set to point to the share dir inside the Kdenlive installation directories. The given standard paths for XDG_DATA_DIRS are typically /usr/share as well as /usr/local/share. So if you install Kdenlive to some other place, such as within your own home directory, make sure to add the path to your home-based share dir to XDG_DATA_DIRS before attempting to start Kdenlive. Failing to do so causes Kdenlive to crash in unexpected situations, such as when trying to select a transition in the timeline.

Here's a nifty little script that sets up the environment variables automatically, then fires up Kdenlive; place this script next to your kdenlive executable. And don't forget to make it executable (chmod u+x kdenlive.sh).

#!/bin/bash
SCRIPT_NAME=$(readlink -f "$0")
SCRIPT_PATH=$(dirname "$SCRIPT_NAME")
export INSTALL_PREFIX=$(dirname "$SCRIPT_PATH")
export LD_LIBRARY_PATH=$INSTALL_PREFIX/lib
export XDG_DATA_DIRS=$INSTALL_PREFIX/share:$XDG_DATA_DIRS:/usr/share
echo "Environment set up for $INSTALL_PREFIX"
$INSTALL_PREFIX/bin/kdenlive

Edit: added missing LD_LIBRARY_PATH setting