以root用户身份启动Ubuntu Gnome应用程序

Ubuntu Linux runs the the desktop as a regular user account, and so all programs launched are launched in the context of a normal user account.

Ubuntu Linux以常规用户帐户运行桌面,因此所有启动的程序都是在常规用户帐户的上下文中启动的。

To run a command-line program with superuser(root) priviledges, you normally will preceed the command with “sudo”, as shown in this example:

要运行具有超级用户(root)特权的命令行程序,通常在命令前加上“ sudo”,如以下示例所示:

sudo gedit filename.txt

须藤gedit filename.txt

Ubuntu provides a graphical alternative to the sudo command that you have probably seen if you try to run any administrative tool:

如果您尝试运行任何管理工具,Ubuntu提供了图形化的替代sudo命令的功能:

You can easily and quickly run any program as root by preceeding the command with the “gksu” command. For instance, let’s launch xterm as root by hitting Alt+F2 to bring up the quick run dialog:

通过在命令前加上“ gksu”命令,您可以轻松快捷地以root用户身份运行任何程序。 例如,让我们通过按Alt + F2以启动root用户启动xterm,以打开快速运行对话框:

We’ll first see the password dialog shown above, enter your password… and there we go – we now have a terminal running as root:

我们首先会看到上面显示的密码对话框,输入您的密码……然后我们就可以了–我们现在有一个以root用户身份运行的终端:

Easy stuff! 

简单的东西!

翻译自: https://www.howtogeek.com/howto/ubuntu/start-an-ubuntu-gnome-application-as-root-user/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值