#!/usr/bin/env bash
# Create a script to auto-start linphone-desktop-beta
# This shows the window at login
# cp "/usr/local/linphone-desktop/4.4.7-beta.0/share/applications/linphone447-beta0-minimized.desktop" "$HOME/.config/autostart"
# This starts linphone-desktop-beta minimized or --iconified
# Remove all previous auto-start .desktop icons
find "$HOME/.config/autostart" -name *linphone*.desktop -type f -exec rm -f {} +
# Copy custom linphone*.desktop file to user's $HOME/.config/autostart folder
mkdir -p "$HOME/.config/autostart"
cp "/usr/local/linphone-desktop/4.4.7-beta.0/share/applications/linphone447-beta0-minimized.desktop" "$HOME/.config/autostart"
# Make the *.desktop file executable
chmod +x "$HOME/.config/autostart/linphone447-beta0-minimized.desktop"
echo "Done. Linphone is in auto-start mode."
