使用root的身份通过拖拉来打开文件

参与到Ubuntu的翻译中来
回复
头像
freeflying
帖子: 521
注册时间: 2005-03-26 9:38

使用root的身份通过拖拉来打开文件

#1

帖子 freeflying » 2005-04-12 9:33

Create a launcher with the following command:

代码: 全选


gksudo "gnome-open %u"

When you drag and drop any file on this launcher (it's useful to put it on the desktop or on a panel), it will be opened as root with its own associated application. This is helpful especially when you're editing config files owned by root, since they will be opened as read only by default with gedit, etc.
头像
freeflying
帖子: 521
注册时间: 2005-03-26 9:38

#2

帖子 freeflying » 2005-04-12 9:39

创建一个起动器,命令如下:

代码: 全选

gksudo "gnome-open %u" 

这样你可以以root权限打开你想打开的文件,只要你将想打开的文件拖拉到此起动器上就可以了,它会用root默认的关联程序打开此文件。


PS:我的翻译没有无安全按照原文,请谅解
头像
ct
帖子: 2201
注册时间: 2005-04-06 21:15
来自: 安徽黄山
联系:

#3

帖子 ct » 2005-04-12 9:57

翻译的很好,我刚试了,这个技巧简直太棒了,值得推广,这样就能充分的体验到X环境的方便性了。
头像
millenniumdark
论坛版主
帖子: 4159
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
联系:

#4

帖子 millenniumdark » 2006-08-01 4:35

:arrow: 初学者园地
回复