What is the difference between sudo and gksudo
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search.
What is the difference between sudo, kdesudo and gksudo, and when should I use each? I know that sudo allows me to run both cli and gui functions, but I've seen other people on websites using kdesudo and gksudo for gui functions.
Learn more about sudo from its official site. From Vinicius's comment. It originally stood for 'superuser do' as the older versions of sudo were designed to run commands only as the superuser.
However, the later versions added support for running commands not only as the superuser but also as other restricted users, and thus it is also commonly expanded as 'substitute user do'. Although the latter case reflects its current functionality more accurately, sudo is still often called 'superuser do' since it is so often used for administrative tasks.
And a short note from wiki. You should never use normal sudo to start graphical applications as Root. You should use gksudo kdesudo on Kubuntu to run such programs. Xauthority to a tmp directory. This prevents files in your home directory becoming owned by Root.
Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Forum rules Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead.
Before you post please read this. Do you mean any programs that have a GUI, and if so why would you be running these from the command line anyway? Keep Calm and Impale Your Enemies. Tip: 10 things to do after installing Linux Mint It can also be used to run GUI programs as another user but only if there is a configured policy specifically for that program that allows for this.
On that respect it differs from gksudo which works for any GUI program without need for policy configuration per program. Note that the pkexec manual discourages configuring policies for GUI programs to allow for this; it is only intended for legacy programs. Instead of running the entire program as root because it may need to do some user requested action for which it needs privileges, the program would be written such that those actions would be in a separate daemon process.
The program can then just run as the user themselves not needing sudo, gksudo or pkexec and only when the user requests that action would the unprivileged program communicate with the privileged daemon process e.
It allows for pkexec to run non-GUI programs as other users. Same as sudo but with a GUI password prompt like gksudo. But ideally programs actually use polkit and thus split code that needs to run with privileges off into a separate daemon process so that the bulk of program can always run unprivileged and there's no need for pkexec. I likely mixed some things up here so any feedback is welcome. Wireless Script. Your data and OS are backed up There are four other answers; which one is incorrect?
Isn't your answer essentially the same as the one by Davros? I was referring to the answer marked as correct. Yes, Davros is saying the same thing, but I added this because his did not contain a link to a source. A better solution would be to propose an edit to that answer.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Explaining the semiconductor shortage, and how it might end. Does ES6 make JavaScript frameworks obsolete? Featured on Meta. Now live: A fully responsive profile. Related 1. Hot Network Questions. Question feed. Super User works best with JavaScript enabled.
Accept all cookies Customize settings.
0コメント