title: Is it possible to launch remote file in native application without manual interaction
body: <p>We can accesss the remote files via SMB protocol</p>
  <blockquote>
  <p>Finder Menu &gt; Go &gt; Connect to server.</p>
  </blockquote>
  <p>ex: smb:///cifsshare/master.tif&quot;</p>
  <p>But when we push the command, we only end up to opening the enclosing directory and not to the tif file. Now if i need to open the master.tif file i need to double click and open it. But for the connection i entered address of the file.</p>
  <p>Iam trying to achieve same functionality with <strong>safari extension</strong>.</p>
  <blockquote>
  <p>NSWorkspace.</p>
  </blockquote>
  <pre><code>if let url = URL(string: path) {
      if NSWorkspace.shared.open(url) {
         print(&quot;Url is opened&quot;)
      }
  }
  </code></pre>
  <p>Result: Same :(</p>
  <blockquote>
  <p>When tried with Process()</p>
  </blockquote>
  <pre><code>//1
  let toolPath = &quot;/usr/bin/open&quot;
  let arguments = [pathUrl.absoluteString]
       
  //2
  let task = Process()
  task.launchPath = toolPath
  task.arguments = arguments
       
  task.launch()
  task.waitUntilExit()
  </code></pre>
  <p>Result: Not Working :(</p>
  <p>Is it even possible in macos?
  Any clue how to achieve this, is highly appreciated.</p>