I'm trying to control Mozilla or Firefox from QProcess on Linux. I get them to start, but I can't change the URL in an already opened browser. I try the command mozilla -remote "openURL(www.qtcentre.org)" but QProcess just opens another instance of the browser. From the command line it works as it should. Anyone know the syntax for this? This is what I'm doing, it doesn't matter if I use process.start or launch.

Qt Code:
  1. if ( !process_started ) {
  2. cout << "Web browser not running. Trying to start" << endl;
  3. args += "mozilla";
  4. args += rUrl;
  5. process.setArguments( args );
  6. QString buf;
  7. process_started = process.launch( buf );
  8. return process_started;
  9. }
  10.  
  11. if ( process_started ) {
  12. cout << "Web browser already running. Sending new address to already opened browser." << endl;
  13. args += "mozilla";
  14. args += "-remote \"openURL(" + rUrl + ")\"";
  15. process.setArguments( args );
  16. QString buf;
  17. process_started = process.launch( buf );
  18. return process_started;
  19. }
To copy to clipboard, switch view to plain text mode