开发者

copying file using super user access

I have a file which needs to be copied into file system of ubuntu OS 10.10 from a gtk program. I can copy from terminal using sudo, but my requirement is i have to use gtk or gnome f开发者_如何学编程ramework.

Thanks in advance iSight


Launch nautilus with gksudo:

gksudo nautilus

Create a file names nautilus_root.desktop in ~/Desktop with the following contents to create a desktop shortcut:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=nautilus as root
Comment=Launch nautilus as root user
Icon=system-file-manager
Exec=gksudo nautilus
Type=Application
Terminal=false
StartupNotify=true
NoDisplay=true


You can use gksu to wrap su and sudo calls.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜