开发者

copying file using super user access

开发者 https://www.devze.com 2023-02-01 17:54 出处:网络
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开发者_如何学编程r

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

精彩评论

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