I use a laptop for a jukebox with wireless speakers on my patio.
I use two desktops. My desktops are simply named ‘one’ and ‘two’. I have Strawberry Music player set to start up when I boot up. The OS (Ubuntu Mate 24.04) always boot so desktop ‘one’, and so does Strawberry.
Is there a way to get Strawberry to start on Desktop ‘two’ on startup instead of desktop ‘one’?
No, that wouldn't work. The script can only be started after the user logged in, X has started and following that, the windowmanager.
So it can only be called from a .desktop file in $HOME/config/autostart/
The mate-control-center -> Startup Applications GUI will create this file automagically for you
Please excuse my ignorance on this but here is what I did:
I installed sudo apt install wmctrl sucessfully.
then I used pluma to make a config file named <wmctrl -s1.config> and saved it in home>jim> .config
the files contains this:
#!/bin/bash
wmctrl -s1
strawberry &
wmctrl -s0
Strawberry did not start at all so I then went to system>preferences>personal>startup applications and made an entry for Strawberry and gave it a one second delay. It now starts but still on desktop one.
I am sure I am either missing something or don’t understand the instructions.
Tricky name. Best practice is to avoid dashes and spaces, otherwise you have to be constantly alert to quote the name accurately.
A descriptive name would probably better, also to avoid mistakes and such.
You better rename it to strawberry_2nd_workspace.sh or something like that.
Also, a better place to store the script (conforming to convention) is in /home/jim/.local/bin
This has also the benefit of not needing the complete path to call it.
The autostart entry should be then strawberry_2nd_workspace.sh
That is to be expected. You need to call the script, not strawberry directly.
The script is not a configfile. It is an executable program, albeit very short
By the way, you can test the script from terminal: strawberry_2nd_workspace.sh