diff --git a/bin/xconfig b/bin/xconfig index 7478333..02bbeec 100755 --- a/bin/xconfig +++ b/bin/xconfig @@ -13,7 +13,13 @@ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" LOG_FILE="/var/log/xconfig.log" XORG_CONF="/etc/X11/xorg.conf" BACKUP_DIR="/etc/X11/backup" -CONFIG_DIR="$SCRIPT_DIR/cardDetect" + +# Try system-wide location first, then fall back to development location +if [ -d "/usr/local/etc/X11/cardDetect" ]; then + CONFIG_DIR="/usr/local/etc/X11/cardDetect" +else + CONFIG_DIR="$SCRIPT_DIR/cardDetect" +fi # Logging with structured output (stderr-safe for $(...) usage) log() {