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 licensed 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.
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/shlsrun -R "order[cpu:mem:login]" $@exit $?