开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Start sBitx app at boot.


 

I know this must have been asked before but i cannot seem to find an answer. I would like to have my radio start-up straight into the sbitx application at boot.?
Is there an easy way to do this?
73 Dave


 

The sound sub systems barfs in startup. An alternative is to wait for 10 seconds ane start?


On Thu, Dec 28, 2023, 1:41 PM <davidmanning592@...> wrote:
I know this must have been asked before but i cannot seem to find an answer. I would like to have my radio start-up straight into the sbitx application at boot.?
Is there an easy way to do this?
73 Dave


 

On Thu, Dec 28, 2023 at 03:11 AM, <davidmanning592@...> wrote:
I know this must have been asked before but i cannot seem to find an answer. I would like to have my radio start-up straight into the sbitx application at boot.? ?Is there an easy way to do this?
On Thu, Dec 28, 2023 at 04:45 AM, Ashhar Farhan wrote:
The sound sub systems barfs in startup. An alternative is to wait for 10 seconds and start?

There is a way I've used on other projects, but not exactly easy unless you already have some Linux skills.

?gives the various autostart approaches that works for various Pi versions.

There may be easier/better ways that I don't know about, but this is one that has worked for me in the past.

Adding commands to the old-school linux startup files like /etc/local typically doesn't work for GUI apps, they typically need to be started under the desktop manager or they fail.

Farhan tells us we need to delay (sleep) for 10 seconds before launching the app, thus the following paragraph of the write-up applies:

In some rare cases you may need to add a delay before starting your script to give the Desktop more time to complete the booting process before your app starts. This can be done with a bash sleep command. Do not attempt to add the sleep command directly in autostart, it won’t work. Use the sleep command in a bash script instead.

So you would want to use the system or user method described in the linked text, and use a text editor to append a line to the chosen autostart file that starts a bash script, kind of like:

@bash /home/pi/start-sbitx.sh
?
In the?/home/pi/start-sbitx.sh file you would want something like:

sleep 10
cd /home/pi/sbitx
./sbitx &

To test it you would need to make it executable

$ chmod +x /home/pi/start-sbitx.sh

then reboot and it *should* work...?

Note, I have tested none of this for sbitx, so it may or may not work the way I think it *should*...

--
Regards,
Dave, N1AI


rdg
 

Dave I have not tested your example code, but a quick review says “good to go”.

Personally I start other processes before the radio but for those that want auto start this should work.?



Sent from for iOS


On Thu, Dec 28, 2023 at 11:39, Dave, N1AI via groups.io <n1ai@...> wrote:
On Thu, Dec 28, 2023 at 03:11 AM, <davidmanning592@...> wrote:
I know this must have been asked before but i cannot seem to find an answer. I would like to have my radio start-up straight into the sbitx application at boot.? ?Is there an easy way to do this?
On Thu, Dec 28, 2023 at 04:45 AM, Ashhar Farhan wrote:
The sound sub systems barfs in startup. An alternative is to wait for 10 seconds and start?

There is a way I've used on other projects, but not exactly easy unless you already have some Linux skills.

?gives the various autostart approaches that works for various Pi versions.

There may be easier/better ways that I don't know about, but this is one that has worked for me in the past.

Adding commands to the old-school linux startup files like /etc/local typically doesn't work for GUI apps, they typically need to be started under the desktop manager or they fail.

Farhan tells us we need to delay (sleep) for 10 seconds before launching the app, thus the following paragraph of the write-up applies:

In some rare cases you may need to add a delay before starting your script to give the Desktop more time to complete the booting process before your app starts. This can be done with a bash sleep command. Do not attempt to add the sleep command directly in autostart, it won’t work. Use the sleep command in a bash script instead.

So you would want to use the system or user method described in the linked text, and use a text editor to append a line to the chosen autostart file that starts a bash script, kind of like:

@bash /home/pi/start-sbitx.sh
?
In the?/home/pi/start-sbitx.sh file you would want something like:

sleep 10
cd /home/pi/sbitx
./sbitx &

To test it you would need to make it executable

$ chmod +x /home/pi/start-sbitx.sh

then reboot and it *should* work...?

Note, I have tested none of this for sbitx, so it may or may not work the way I think it *should*...

--
Regards,
Dave, N1AI


 

Hello Dave, N1AI?

Your writeup was excellent and the start-up works perfectly for my radio with V3 software.?

Many thanks,
Dave, ZL1DMM

??


 

On Thu, Dec 28, 2023 at 04:03 PM, <davidmanning592@...> wrote:
Your writeup was excellent and the start-up works perfectly for my radio with V3 software.?

That's great news, thanks for testing it!

This means I will be adding one more line to our group How-To page (?/g/BITX20/wiki/30883?)...

?
--
Regards,
Dave, N1AI


 

Hi Dave,

While at it, you might want to include the DSI touchscreen mapping for those using a second or VNC-like connected screen.

Here is a copy of the startup that I use:

cd /home/pi/sbitx
sudo xinput map-to-output "raspberrypi-ts" "DSI-1"
./sbitx &> errlog.txt

The two changes are the xinput map command and the redirect of the error messages to errlog.txt.

I have also tried forcing the sBitx program to start in the DSI-1 window without a repeatable process.? I tried the --window-settings=0,0, and that did not work.? This was in a desktop launcher property.? I am open to suggestions.

73
Evan
AC9TU