Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的要求很简单,我希望一些聪明的极客可以帮助我。
我正在开发一个项目 [LINUX-UBUNTU],我有一个c 程序,其中我有一个 char 数组,其中包含一个文件的路径,想要在 Ubuntu nautilus 浏览器中打开该文件夹,我也希望该文件得到可以自动选择。
任何帮助或指导都会很棒。
--
谢谢
阿洛克 Kr.
您可以使用popen(或其家族中的任何一个)来调用 nautilus。一方面,如果参数是一个目录,那么 nautilus 将打开一个包含该目录的窗口。另一方面,如果参数是一个文件,那么 nautilus 将在该目录中打开一个窗口并选择该文件。