Uses the current user’s application configuration but mess with the configuration file access permissions like sudo -H etc.Doesn’t require the execution of potentially unsafe applications with elevated privileges.Doesn’t require security policy changes like pkexec (for which you’d need to edit files… as super-user, the exact thing this answer is trying to solve).Doesn’t require additional and/or deprecated applications.Since sudoedit waits for the editor process to terminate to apply changes to the edited file, this may be necessary if you have other instances of the same Editor running: Some editor offer a command-line option to always start a new instance, even if one is currently running. Of course you can use any other editor that you like, e. Which is equivalent to VISUAL=gedit sudoedit /path/to/some-config-file.cfg You can use sudo -e or its alias sudoedit with your favourite (graphical!) text editor through the VISUAL environment variable 1: VISUAL=gedit sudo -e /path/to/some-config-file.cfg In Ubuntu 18.04, gksudo is not available in the official repositories. See Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland? for details. In Ubuntu 17.10, Wayland is default instead of the traditional X server, and running graphical editors as root is difficult. You will have to install the gksu package (either from the Software Centre or via sudo apt-get install gksu) to get it. In Ubuntu 14.04 onwards, gksudo is not installed by default. In either case, you'll need to first provide your password when requested. In old versions of Ubuntu, gksudo /etc/dhcp/nfig could be used to launch GUI editors.sudo -H /etc/dhcp/nfig for GUI editors in general.gedit admin:///etc/dhcp/nfig using the the admin:// protocol with GNOME applications such as gedit (and others that support GVfs).sudoedit /etc/dhcp/nfig if you are using a terminal-based editor such as nano or are ssh'ing into a server.Which text editor are you using? If you are a sudoer and know your password, try (in a terminal) either:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |