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命令的功能:
![](https://i-blog.csdnimg.cn/blog_migrate/a72beb9fe98f91ab1762b9c54f24ac70.png)
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,以打开快速运行对话框:
![](https://i-blog.csdnimg.cn/blog_migrate/7e9b27c3d2f254ff9bf7d7f97c25e06d.png)
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用户身份运行的终端:
![](https://i-blog.csdnimg.cn/blog_migrate/7b1b48caf548e31226419421fe46fbd4.png)
Easy stuff!
简单的东西!
翻译自: https://www.howtogeek.com/howto/ubuntu/start-an-ubuntu-gnome-application-as-root-user/