Fester Bestertester wrote: ↑Tue Feb 27, 2018 4:00 am
I use my Pi3 as a 24/7 beacon to the Amateur Radio APRS system (look that one up!), and would like to have it auto-start the program xastir on Virtual Desktop #4 at boot so I don't have to do a daily check. The command is in the Path (at /usr/bin) so I envisage a script such as:
xastir & :4
with the :4 denoting the destination desktop number. Is such possible? and if so, how/where to invoke it?
Cheers
FBt
As always do update before attempting to install anything:
If you haven't already then install openbox config then configure as many desktops as you need.
Now install wmctrl
Make a file like this:
Code: Select all
sleep 1
wmctrl -s 3
sleep 1
pcmanfm
sleep 1
wmctrl -s 0
The above example will start filemanager on desktop 3 then switch back to desktop 0
Note Desktops are numbered 0 1 2 3.....
You may need to adjust the sleep times if the programs starts on the wrong desktop.
You can run this from the comand line to test:
Edit autostart
Code: Select all
nano /home/pi/.config/lxsession/LXDE-pi/autostart
Add this to the end of what's there:
I tested with logout and back in and it works as written above. As mentioned sleep timers may need to be adjusted if reboot or full power on does not work correctly.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.