#!/bin/sh

################################################################################
# Copyright (C) 2013-2026 NICE s.r.l.
# All Rights Reserved
#
# This software is the confidential and proprietary information
# of NICE s.r.l. ("Confidential Information").
# You shall not disclose such Confidential Information
# and shall use it only in accordance with the terms of
# the license agreement you entered into with NICE.
################################################################################

prefix=/usr
exec_prefix=/usr
bindir=/usr/bin
libdir=/usr/lib/x86_64-linux-gnu
libexecdir=/usr/lib/x86_64-linux-gnu
datadir=/usr/share

if command -v "${libexecdir}/dcvsetroot" 2>&1 >/dev/null; then
    export LD_LIBRARY_PATH="${libdir}/dcv:${LD_LIBRARY_PATH}"
    export XDG_DATA_DIRS="${datadir}:${XDG_DATA_DIRS}:/usr/share:/usr/local/share"

    "${libexecdir}/dcvsetroot" --bgcolor black --image "${datadir}/dcv/images/dcvstartx.png"
elif command -v xsetroot 2>&1 >/dev/null; then
    xsetroot -solid gray
fi

# Gives DCV access to the 3D Accelerated X Server
xhost +LOCAL:

# Infinite sleep
tail -f /dev/null

# --------------------------------------------------------------------------- #
# ex: set ts=4 sw=4 et syntax=sh :
# --------------------------------------------------------------------------- #
