![]() They also set $XAUTHORITY to a new file, so the application you launch runs safely with its own X authorization. admin://and pkexec set $HOME safely to the home directory of root, so the application you run doesn't change the ownership of (settings) files in your home directory to root. Here's a summary of the important differences between these commands:Ī. For sudo and su you type the password in the terminal (which in Ubuntu doesn't give you any visual feedback as you type it: not even dots or asterisks will show. For su, pkexec and admin:// you don't need to be a member of the sudo group to be able to use it.įor pkexecand admin:// you get a graphical window to type in your password. For sudo you need to be a member of the sudo group to be able to use them. See the screenshot below (click on it to enlarge it):Ģ. For example, press the Ctrl key and keep it pressed. Nano can therefore be launched with root permissions like this, in orde to edit /etc/default/grub (which I've used as example so far):Īt the bottom of the window you can see the controls it accepts (usually the Ctrl key in combination with a letter). As Nano is terminal-only, it doesn't need the protective layer of admin:// or pkexec. Both in Mint and in Ubuntu (and in all the derivatives of Ubuntu). Finally, you can also use a nifty terminal-only text editor, namely Nano. Launching text editor Nano with root authorityġ.3. Note (3): closing the terminal might also affect the root instance of your text editor: the terminal is always in charge! So don't close the terminal window until you're done. Note (2): the first time that you use admin:// in a session, you'll be asked to enter your password twice. Note (1): the three consecutive slashes are no typo, but intended. Use copy/paste to transfer the appropriate blue command line into the terminal (this varies for Linux Mint and Ubuntu): In order to launch your text editor with the necessary root permissions from the terminal, you can proceed as follows:ī. For a graphical editor like Xed or Gedit, that can safely be done by means of admin://.Īn example makes it easy: suppose you want to edit the configuration of your boot loader Grub, which resides in /etc/default/grub. For editing system configuration files, you need to launch a text editor with root permissions. Launching text editor Xed or Gedit with root authorityġ.2. Note: closing the terminal might also affect the root instance of your file manager: the terminal is always in charge! So don't close the terminal window until you're done. Use copy/paste to transfer the appropriate blue command line into the terminal (this varies for each Mint edition):įinally, for Ubuntu (Nautilus) you need to do this first. (You can launch a terminal window like this: *Click*)ī. In order to launch your file manager with root permissions from the terminal, you can proceed as follows: Or failing that, you have to launch your file manager from the terminal with the protection of pkexec. Because the default file manager is so much engrained in the system as a whole, that this might easily cause problems.įor managing files as root, you therefore need to use the "root feature" in the panel menu of your file manager. In such cases it's extra important to run the file manager with a protective layer, in order to prevent messing up the file permissions in your system. File management with root authority is always risky, because you can break so much so easily. Launching a file manager with root authority (omnipotence)ġ.1. Those problems are caused by applications that expect to be able to use certain files or folders, but unexpectedly can't, because those files or folders have become root-owned. Otherwise you may end up with graphical applications changing the ownership of (settings) files in your home directory to root, which can cause various problems. Use sudo and su only for command line programs. You should always use pkexec or admin:// for running graphical programs as root. This is based on the excellent explanation that xenopeek has given on the Linux Mint forum (essentially, my explanation is just a simplification of that).īottom line (for the lazy reader): always use pkexec or admin:// for graphical applications that need root authority.Īlways use pkexec or admin:// for graphical applicationsġ. Repair damage caused by graphical abuse of sudoīelow, I outline some important differences between various forms of root usage, namely su, sudo, pkexec and admin://. Determine quickly who's in the sudo group ![]() Launching text editor Nano with root authority Launching text editor Xed or Gedit with root authority Launching a file manager with root authority (omnipotence) Always use pkexec or admin:// for graphical applications
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |