lsrun -R "type==any && appY order[mem:cpu]" sh -c "appY -display your_PC:0.0 &"
You must make sure that all the UNIX servers for appY are configured with the resource "appY". In this example, appY requires a lot of memory when there are embedded graphics, so we make "mem" the most important consideration in selecting the best host among the eligible servers.
lsrun -R "resource_requirement" my_Xapp -display your_PC:0.0
where
resource_requirement is your resource requirement string
The above examples require the specification of resource requirement strings by users. You may want to centralize this such that all users use the same resource specifications.
#!/bin/sh
lsrun -R "order[cpu:mem:login]" $@
exit $?
lslaunch xterm -sb -ls -display your_PC:0.0
#!/bin/sh
lsrun -R "order[cpu:mem:login]" xterm -sb -ls $@
exit $?
lsxterm -display your_PC:0.0