开发者

Opening a folder locating a specific file in Ubuntu Nautilus Browser

开发者 https://www.devze.com 2023-03-23 19:41 出处:网络
My requirement is simple, I hope some intelligent geeks can help me here out. I am working on a project[LINUX-UBUNTU], I have a c program, in which I have a char array having a path to a file, an wan

My requirement is simple, I hope some intelligent geeks can help me here out.

I am working on a project[LINUX-UBUNTU], I have a c program, in which I have a char array having a path to a file, an want to open that folder in Ubuntu nautilus browser, also I want that file to get selected automatically possible.

Any help or guidance will be great.开发者_如何学编程

--

Thanks

Alok Kr.


You can use popen (or any from its family) to call nautilus. On one hand, if the argument is a directory, then nautilus will open a window with that directory. On the other hand, if the argument is a file, then nautilus will open a window in that directory with that file selected.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号