1

This question already has an answer here:

I'd like to write bash script that starts certain application on startup. I would like to have for example Firefox opened in first workspace, Slack on second, spotify on third. I know how to start these applications, but don't know how to place them in specific workspace. Is it possible in Ubuntu 17 ?

marked as duplicate by Byte Commander, karel, user535733, Eric Carvalho, muru bash Feb 26 '18 at 14:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Not exactly a "programmatic" solution, but you may use a GNOME shell extension called Auto Move Windows to achieve your goal (assuming you meant Ubuntu 17.10 with GNOME shell). This extension lets you

Move applications to specific workspaces when they create windows.

Once the extension is installed and activated, open its settings and click on "Add Rule" to select an application and a workspace for the application.

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.