Yes, I was thinking something basic like that would work. I was trying to make my script a little smarter by checking for network availability. I came across https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ which suggests (or that's how I interpreted) if I have something like following in my KDE user level autostart script, it would work:
#! /bin/sh
echo "Checking network status" > $HOME/net.log
loop_ctr=1
while ! systemctl status network-online.target >> $HOME/net.log && [ $loop_ctr -le 10 ]; do
echo "Sleeping for 5 seconds" >> $HOME/net.log
sleep 5
loop_ctr=$((loop_ctr+1))
done
ip addr list >> $HOME/net.log
/usr/bin/SpiderOakONE
The script didn't work the way I had hoped because network-online.target was active and yet (except for the loopback interface) I didn't have an IP address assigned. I may have misunderstood, but any clue, why network-online.target becomes active before an IP address is obtained?
Thanks