EXEC_SHELL_PATH=$(command -v bash) # Run Anki with nohup, redirecting output to a log file nohup flatpak run net.ankiweb.Anki > anki.log 2>&1 & # Disown the process to remove it from the shell's job table disown # Close the terminal exit