Trying to execute:
Qt Code:
  1. xprop -id `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}'` | grep "WM_CLASS(STRING)" | sed -e 's/.*= "\([^"]*\)".*/\1/'
To copy to clipboard, switch view to plain text mode 
with the code:
Qt Code:
  1. sh.setProcessChannelMode(QProcess::MergedChannels);
  2. sh.start("xprop -id `xprop -root | grep \"_NET_ACTIVE_WINDOW(WINDOW)\" | awk \'{print $5}\'` | "
  3. "grep \"WM_CLASS(STRING)\" | sed -e \'s/.*= \"\\([^\"]*\\)\".*/\\1/\'");
  4. ...
To copy to clipboard, switch view to plain text mode 
but what i get is:
Qt Code:
  1. xprop: error: Invalid window id format: `xprop.
To copy to clipboard, switch view to plain text mode 
What did i forget to do?
Thanks.