![]() ![]() ![]() For nautilus users, the package nautilus-admin installs a PolicyKit file for gedit and provides a right-click menu option in nautilus to launch a text file in gedit with root permissions. You can install a PolicyKit file, but you also may run it with some environment variables. Still, it is possible to run a graphical editor as root using pkexec. These two options do not at any time run your graphical editor as root, which is preferred. On the VFAT partition edit the config.txt file and uncomment the enableuart line. Then position your cursor after the text and use CTRL+K or ALT+6 to cut or copy. Installing Fedora on a Raspberry Pi using the Fedora ARM installer. You create an alias or create a small script to edit system text files in a graphical editor with a single command. Position your cursor at the start of the text and press CTRL+6. Thus, the environment is changed only when you explicitly want to use the graphical editor. ![]() This can actually be combined in a single command: env SUDO_EDITOR="/usr/bin/gedit" sudoedit Once the editor is closed, the modified temporary copy is copied back over the system file. Much the way the admin:// URI does, this will create a temporary copy, which you edit as a normal user. ![]() Then, you can use the command sudoedit or sudo -e to open a system file in your graphical editor. Setup the SUDO_EDITOR environment variable to point to the binary of your graphical editor, for example: export SUDO_EDITOR="/usr/bin/gedit". Of course, your user needs to belong to the root group in order to edit system files.Īn approach valid for any desktop environment with any editor would be to use sudoedit. In older Ubuntu versions (prior to 20.10), the very first time you do this, you need to supply your user password two times in a row. For example, to edit /etc/fstab, issue the following command in the run dialog you obtain after pressing Alt+ F2 or on the terminal: gedit admin:///etc/fstab In Ubuntu, the official way to edit system files as root with a graphical editor is to use the admin:// URI. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |