Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-04-22 07:13:07

Tubes
Member
Registered: 2021-04-22
Posts: 3

Launching and mapping applications to specific virtual desktops

Hello all,

I searched the topics maybe wrong but I would like to know if or how I can make it so that certain applications are launched on /moved to certain virtual desktops?

xfce: 4.16
OS: Linux 5.4.112-1-MANJARO

Thanks in advance for any advice.

Last edited by Tubes (2021-04-22 07:52:38)

Offline

#2 2021-04-22 11:42:29

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Launching and mapping applications to specific virtual desktops

Hello and welcome.
You can use devilspie or the newer gdevilspie. See: this thread for a discussion.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2021-04-23 08:16:08

Tubes
Member
Registered: 2021-04-22
Posts: 3

Re: Launching and mapping applications to specific virtual desktops

ToZ wrote:

Hello and welcome.
You can use devilspie or the newer gdevilspie. See: this thread for a discussion.

This looks very promissing! I already have my .ds script for testing purposes ready:

(if
    (is (application_name) "Signal")
    (begin
        (set_workspace 1)
    )
)
(if
    (is (application_name) "Vivaldi")
    (begin
        (set_workspace 2)
    )
)
(if
    (is (application_name) "Thunar")
    (begin
        (set_workspace 3)
    )
)
(if
    (is (application_name) "noson")
    (begin
        (set_workspace 4)
    )
)
(if
    (is (application_name) "VirtualBox")
    (begin
        (set_workspace 4)
    )
)
(if
    (is (application_name) "VirtualBoxVM")
    (begin
        (set_workspace 3)
    )
)

I already created the ~/.devilspie/ directory in my home as well as a .ds file in there.

Could you post yours as an example? Of course only if you use it for yourself. Do I need to setup devilspie to autostart via systemctl? How would you do it to be executed best when my login accurs?

Thanks for your great help!

[update] I get the following error messages which I try to figure out

got eof
Window Title: 'Terminal - hpweecks@pc-26:~/.devilspie'; Application Name: 'Xfce-Terminal'; Class: 'Xfce4-terminal'; Geometry: 1920x864+0+0

** (devilspie:153296): CRITICAL **: 10:17:16.437: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'Launching and mapping applications to specific virtual desktops / Desktop / Xfce Forums - Vivaldi'; Application Name: 'Launching and mapping applications to specific virtual desktops / Desktop / Xfce Forums - Vivaldi'; Class: 'Vivaldi-stable'; Geometry: 1908x1037+12+0

** (devilspie:153296): CRITICAL **: 10:17:16.437: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'Win10E [wird ausgef?hrt] - Oracle VM VirtualBox'; Application Name: 'VirtualBoxVM'; Class: 'VirtualBox Machine'; Geometry: 1908x1037+12+0

** (devilspie:153296): CRITICAL **: 10:17:16.437: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'CryptKeeper_Encfs'; Application Name: 'Thunar'; Class: 'Thunar'; Geometry: 1279x815+227+106

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'Oracle VM VirtualBox Manager'; Application Name: 'VirtualBox'; Class: 'VirtualBox Manager'; Geometry: 1019x838+173+61

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'Schreibtisch'; Application Name: 'xfdesktop'; Class: 'Xfdesktop'; Geometry: 1920x1080+0+0

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'noson'; Application Name: 'noson'; Class: 'io.github.janbar.noson'; Geometry: 980x670+784+183

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'xfce4-panel'; Application Name: 'xfce4-panel'; Class: 'Xfce4-panel'; Geometry: 1920x43+0+1037

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed

Last edited by Tubes (2021-04-23 08:20:59)

Offline

#4 2021-04-23 11:14:54

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Launching and mapping applications to specific virtual desktops

Tubes wrote:

Do I need to setup devilspie to autostart via systemctl? How would you do it to be executed best when my login accurs?

When I've used it, I just place an entry in Application Autostart (Settings Manager > Session and Startup > Application Autostart). If you want, you could create a user-based systemd service for this as well.

[update] I get the following error messages which I try to figure out

got eof
Window Title: 'Terminal - hpweecks@pc-26:~/.devilspie'; Application Name: 'Xfce-Terminal'; Class: 'Xfce4-terminal'; Geometry: 1920x864+0+0

** (devilspie:153296): CRITICAL **: 10:17:16.437: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'Launching and mapping applications to specific virtual desktops / Desktop / Xfce Forums - Vivaldi'; Application Name: 'Launching and mapping applications to specific virtual desktops / Desktop / Xfce Forums - Vivaldi'; Class: 'Vivaldi-stable'; Geometry: 1908x1037+12+0

** (devilspie:153296): CRITICAL **: 10:17:16.437: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'Win10E [wird ausgef?hrt] - Oracle VM VirtualBox'; Application Name: 'VirtualBoxVM'; Class: 'VirtualBox Machine'; Geometry: 1908x1037+12+0

** (devilspie:153296): CRITICAL **: 10:17:16.437: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'CryptKeeper_Encfs'; Application Name: 'Thunar'; Class: 'Thunar'; Geometry: 1279x815+227+106

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'Oracle VM VirtualBox Manager'; Application Name: 'VirtualBox'; Class: 'VirtualBox Manager'; Geometry: 1019x838+173+61

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'Schreibtisch'; Application Name: 'xfdesktop'; Class: 'Xfdesktop'; Geometry: 1920x1080+0+0

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'noson'; Application Name: 'noson'; Class: 'io.github.janbar.noson'; Geometry: 980x670+784+183

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed
Window Title: 'xfce4-panel'; Application Name: 'xfce4-panel'; Class: 'Xfce4-panel'; Geometry: 1920x43+0+1037

** (devilspie:153296): CRITICAL **: 10:17:16.438: e_sexp_eval: assertion 'f->tree != NULL' failed

I believe you are allowed only one "if" statement in a file with original devlispie. You will need to create multiple .ds files - one for each application. With devlispie2, I think it allows multiple directives in one file, but it uses lua-styled scrtipting language instead.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2021-04-24 10:30:12

Jerry3904
Member
Registered: 2013-11-09
Posts: 850

Re: Launching and mapping applications to specific virtual desktops

Does gdevilspie still work? It did not the last time I tried (Debian 10). I should give it a whirl on our MX-21 alpha.


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#6 2021-04-24 16:36:52

Tubes
Member
Registered: 2021-04-22
Posts: 3

Re: Launching and mapping applications to specific virtual desktops

ToZ wrote:

When I've used it, I just place an entry in Application Autostart (Settings Manager > Session and Startup > Application Autostart). If you want, you could create a user-based systemd service for this as well.
[...]
I believe you are allowed only one "if" statement in a file with original devlispie. You will need to create multiple .ds files - one for each application. With devlispie2, I think it allows multiple directives in one file, but it uses lua-styled scrtipting language instead.

Thank you for your hint about the Autostart. Regarding the "if" statement, it seems not necessaryI. I found these tutorials which helped me learn how to write .ds correctly.

https://wiki.ubuntuusers.de/Devilspie/
https://wiki.gnome.org/Projects/DevilsPie

Solved! Thank you!

Last edited by Tubes (2021-04-24 16:37:33)

Offline

Board footer

Powered by FluxBB