Problem starting pvserver using servers.pvsc file on desktop machine

Dear all,
I’m trying to start pvserver on a certain amount of cores on my desktop computer using servers.pvsc file. I tried both the direct and the reverse connection strategy but could not find a way to let it work.
This is how my servers.pvsc looks like:

<Servers>
  <Server name="DESKTOPMACHINE - REVERSE" resource="csrc://localhost">
    <CommandStartup>
      <Options>
        <Option name="PV_CONNECT_ID" label="Connect ID" readonly="true">
          <Range type="int" min="1" max="65535" step="1" default="random"/>
        </Option>
        <Option name="NPROC" label="Number of Processors:">
          <Range type="int" min="1" max="8" step="1" default="4"/>
        </Option>
      </Options>
      <Command exec="/usr/bin/mpirun -np $NPROC$ /opt/paraview_v5.8.0/bin/pvserver" delay="5" timeout="60">
        <Arguments>
          <Argument value="-rc"/>
          <Argument value="-ch=desktopMachineName"/>
          <Argument value="--connect-id=$PV_CONNECT_ID$"/>
        </Arguments>
      </Command>
    </CommandStartup>
  </Server>
  <Server name="DESKTOPMACHINE" resource="cs://localhost">
    <CommandStartup>
      <Options>
        <Option name="PV_CONNECT_ID" label="Connect ID" readonly="true">
          <Range type="int" min="1" max="65535" step="1" default="random"/>
        </Option>
        <Option name="NPROC" label="Number of Processors:">
          <Range type="int" min="1" max="8" step="1" default="4"/>
        </Option>
      </Options>
      <Command exec="/usr/bin/mpirun -np $NPROC$ /opt/paraview_v5.8.0/bin/pvserver" delay="5" timeout="60">
        <Arguments>
          <Argument value="--connect-id=$PV_CONNECT_ID$"/>
        </Arguments>
      </Command>
    </CommandStartup>
  </Server>
</Servers>

On the client dialog box, when connecting, no messages appear except “Command aborted.”
The previously mentioned server settings work when I remove the mpirun -np NPROCS part from the exec command.
Any idea about how to fix this?
Thanks in advance,
Lorenzo

try passing all arguments you have in the exec attribute as e.g.

Instead of

<Command exec="/usr/bin/mpirun -np $NPROC$ /opt/paraview_v5.8.0/bin/pvserver" delay="5" timeout="60">
  <Arguments>
    <Argument value="--connect-id=$PV_CONNECT_ID$"/>
  </Arguments>
</Command>

Use

<Command exec="/usr/bin/mpirun" delay="5" timeout="60">
  <Arguments>
    <Argument value="-np" />
    <Argument value="$NPROC$" />
    <Argument value="/opt/paraview_v5.8.0/bin/pvserver" />
    <Argument value="--connect-id=$PV_CONNECT_ID$"/>
  </Arguments>
</Command>

It works,
thanks a lot!

Actually the modification worked on pv 5.8.0 installed on Ubuntu 18.04 LTS but did not on my office machine (debian 10 - testing) where I compiled the software from Source.
This is the revised version of the file that I used as suggested:
servers.pvsc (783 Bytes)
Still getting the same output message: “Command aborted.”

Just to clarify a little more the situation, every command except mpirun|mpiexec is correctly performed when connecting.