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.
精彩评论