Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vanilla Debian Script Issues #4

Open
TodWulff opened this issue Mar 17, 2023 · 2 comments
Open

Vanilla Debian Script Issues #4

TodWulff opened this issue Mar 17, 2023 · 2 comments

Comments

@TodWulff
Copy link

(new to linux & new to python <-- just to set a context)

Considering a fresh install of Debian 11 on an amd64 box (non-gui), installing somafm via pip works - opening the app works and it makes music (mplayer and mpv are installed from previous endeavors). :)

I am having one issue and one possible feature request:

  1. on a ctl-c, to quit the script, it errors as depicted here: https://i.imgur.com/kK40B2S.png
    BTW, SSH client (putty) requires a 'reset' as chars are making it to the server but not echoed in the terminal after the error.
    Also, the error orphans /tmp/soma.pid, requiring a manual rm of same before script runs again. https://i.imgur.com/XszcEGv.png

  2. [FR?} Is it possible to have the script continue to run when it is forced to the background?
    If I ctl-z to do other things in the ssh session, the player ceases to make music until I foreground it again.
    If I try to force it background/subshell on launch with the & control operator, it keeps quiet, sadly.

If these are easily resolved, please advise salient details. Thanks, in advance.

~MHz

@TodWulff TodWulff changed the title Generic Debian Script Issues Vanilla Debian Script Issues Mar 17, 2023
@TodWulff
Copy link
Author

#2 is resolved thanks to nohup ( nohup somafm > /dev/null 2>&1 & ).

@MS3FGX
Copy link
Owner

MS3FGX commented Mar 17, 2023

Well that's surprising. It appears that Debian doesn't ship the "killall" command by default, which is why Ctrl-C isn't exiting cleanly.

For reference, the result of Ctrl-C should look like the following, with a "Forced Close" message and the temporary files cleaned up properly:

image

Long term, I should perhaps rethink the way force closing the script is handled if it's not going to work as expected on some distros. But in the meantime, it looks like you just need to install the psmisc package which will get you the "killall" command (as well as a few others):

https://debian.pkgs.org/11/debian-main-amd64/psmisc_23.4-2_amd64.deb.html

Alternately, if you're using mplayer as the backend (it looks like it, from the picture), you should be able to stop playback by simply pressing Q. This will make mplayer exit normally, and doesn't require the killall command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants