Keyboard Shortcuts
Likes
Search
Autostart JS8Call attached to QDX/QRP radio
I've been trying to autostart (CRONTAB) JS8Call on a Pi4B running either Bookworm or Bullseye attached to a QDX/QRP radio.? I can start JS8Call fine from the command line or via the menu but if I attempt to start it from Crontab it no longer sees the audio devices.
crontab entry is:
#start js8call
@reboot sleep 40 && export DISPLAY=:0 && /usr/bin/js8call >> /home/pi/js8_start.log 2>&1
(js8_start.log to aid in troubleshooting)
?
Starting js8call (or wsjtx for that matter) from command line or menu? shows alsa_input.usb-QRP_Labs_QDX_Transceiver-02.analog-stereo for input and the corresponding alsa/QRP Labs output for output.
Running via CRONTAB statement above will launch JS8Call (or wsjtx) but Audio input and output listings are empty and neither of the alsa xxxx QRP_Labs devices exist.
?
Any thoughts?
Thanks
Jerry |
I'm really out of my league here, but feel your pain trying to understand sound devices under Linux with my own QDX, QMX, and X6100 radios and vanilla Debian.
?
It's probably, first of all, an environment thing.? Cron jobs run under their own limited environment that comes and goes with the job.? Apparently the display environment is available to the job or else you wouldn't even have the JS8/WSJT-X GUI show up.? I'm guessing that you're logged in as a user with a graphical environment when the cron job launches, otherwise there would be no display environment, either.
?
Again merely guessing, the ALSA devices are:? a) unavailable to the user under which the job runs;? b) considered busy and not made available to the temporary environment set during the job;? or c) available under the job environment, but the "connection" to them ends when the job environment disappears and JS8Call is left with some null reference.? Regarding (a), believe it or not, root is blocked from some system services - I presume for the sake of security - so could very well NOT have access to audio services when executing a job.
?
These threads might be helpful:?
?
?
The solution may basically be getting your login environment shared with the job so the devices are seen persistently.? The threads above have some troubleshooting suggestions that show whether the ALSA devices are even available when the job runs.
?
Good luck!? Let us know when you figure it out.
?
73,
?
?? Dan
?
? |
¿ªÔÆÌåÓýThanks Dan.? I think you likely on target.? Even if it fails with the Cron job, clicking on the Mic or Speaker icons in the taskbar still show the QDX devices selected as the defaults. I¡¯ll check out the articles and continue pursuing this.? Will let you know how it turns out. ? 73 Jerry KD0UXW ? From: [email protected] <[email protected]>
On Behalf Of N7SHM via groups.io
Sent: Wednesday, November 20, 2024 10:25 AM To: [email protected] Subject: Re: [KM4ACK-Pi] Autostart JS8Call attached to QDX/QRP radio ? I'm really out of my league here, but feel your pain trying to understand sound devices under Linux with my own QDX, QMX, and X6100 radios and vanilla Debian. ? It's probably, first of all, an environment thing.? Cron jobs run under their own limited environment that comes and goes with the job.? Apparently the display environment is available to the job or else you wouldn't even have the JS8/WSJT-X GUI show up.? I'm guessing that you're logged in as a user with a graphical environment when the cron job launches, otherwise there would be no display environment, either. ? Again merely guessing, the ALSA devices are:? a) unavailable to the user under which the job runs;? b) considered busy and not made available to the temporary environment set during the job;? or c) available under the job environment, but the "connection" to them ends when the job environment disappears and JS8Call is left with some null reference.? Regarding (a), believe it or not, root is blocked from some system services - I presume for the sake of security - so could very well NOT have access to audio services when executing a job. ? These threads might be helpful:? ?
? The solution may basically be getting your login environment shared with the job so the devices are seen persistently.? The threads above have some troubleshooting suggestions that show whether the ALSA devices are even available when the job runs. ? Good luck!? Let us know when you figure it out. ? 73, ? ?? Dan ? ? |
My guess would be that the cron is running?as root or some other user, instead of the username that set it up so you are not accessing the config file at startup typically?this is in your home directory at ~/.js8call/js8call.cfg and houses your settings including audio settings adding your username or the user that originally?configured JS8call will fix it.? something like: @reboot sleep 40 && export DISPLAY=:0 &&? <myusername> /usr/bin/js8call >> /home/pi/js8_start.log 2>&1 would likely yield?the desired results Just guessing as I don't have a box available to test that theory?on at the moment. Thanks, Ralph Shepard KE0SWK On Wed, Nov 20, 2024 at 11:15?AM Jerry P via <jlpainter2014=[email protected]> wrote:
|
¿ªÔÆÌåÓýI followed the link to
? and added the lines suggested to my /usr/bin/Start_js8call.sh script ------------------------------------------------ /home/pi (in my case)/.bashrc /home/pi/.profile ? export PULSE_RUNTIME_PATH=¡±/run/user/$(id -u)/pulse/¡± export XDG_RUNTIME_DIR=¡±/run/user/$(id -u)¡± ? PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin Export DISPLAY=:0.0 ? While this fixed the problem (js8call not starts fine via the Start_js8call.sh script from crontab) I¡¯m frustrated that I don¡¯t really know what those lines resolved (still wobbly with Linux). ? Thanks Dan and Ralph for the feedback. ? 73 ¨C Jerry ? From: [email protected] <[email protected]>
On Behalf Of N7SHM via groups.io
Sent: Wednesday, November 20, 2024 10:25 AM To: [email protected] Subject: Re: [KM4ACK-Pi] Autostart JS8Call attached to QDX/QRP radio ? I'm really out of my league here, but feel your pain trying to understand sound devices under Linux with my own QDX, QMX, and X6100 radios and vanilla Debian. ? It's probably, first of all, an environment thing.? Cron jobs run under their own limited environment that comes and goes with the job.? Apparently the display environment is available to the job or else you wouldn't even have the JS8/WSJT-X GUI show up.? I'm guessing that you're logged in as a user with a graphical environment when the cron job launches, otherwise there would be no display environment, either. ? Again merely guessing, the ALSA devices are:? a) unavailable to the user under which the job runs;? b) considered busy and not made available to the temporary environment set during the job;? or c) available under the job environment, but the "connection" to them ends when the job environment disappears and JS8Call is left with some null reference.? Regarding (a), believe it or not, root is blocked from some system services - I presume for the sake of security - so could very well NOT have access to audio services when executing a job. ? These threads might be helpful:? ?
? The solution may basically be getting your login environment shared with the job so the devices are seen persistently.? The threads above have some troubleshooting suggestions that show whether the ALSA devices are even available when the job runs. ? Good luck!? Let us know when you figure it out. ? 73, ? ?? Dan ? ? |