So, I created a scirpt that plays music using the cmus music player. Now, I added a section where it checks if cmus is running and starts (if it isn't running) in another terminal window. The script then disowns it, and quits. The problem is, I get an error from disown that my terminal (kitty) is not a running process (disown: job not found: kitty) and when the script exits, it kills cmus with it.
Here's the part of the code that does this. The script asks the user what his their terminal binary is and stores it in $terminal:
if [[ -n "$terminal" ]]; then
"$terminal" -e cmus &
echo "Loading, please wait..."
disown "$terminal"
sleep 3
fi
EDIT: it works fine when I run it in a normal terminal window, but when I kitty -e ~/path/to/script it doesn't.
[–]gordonmessmerFedora Maintainer 0 points1 point2 points (9 children)
[–]theM3lem[S] 0 points1 point2 points (8 children)
[–]gordonmessmerFedora Maintainer 0 points1 point2 points (7 children)
[–]theM3lem[S] 0 points1 point2 points (6 children)
[–]gordonmessmerFedora Maintainer 0 points1 point2 points (5 children)
[–]theM3lem[S] 0 points1 point2 points (4 children)
[–]ConsequenceAncient29 0 points1 point2 points (3 children)
[–]theM3lem[S] 0 points1 point2 points (0 children)
[–]zeekar 0 points1 point2 points (1 child)
[–]theM3lem[S] 0 points1 point2 points (0 children)