The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 5,947β€…    Votes:  2β€…
Tags: sudo   vim  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

URL: https://askubuntu.com/q/1090647
Title: Is Vim safe to use in combination with sudo?
ID: /2018/11/07/Is-Vim-safe-to-use-in-combination-with-sudo_
Created: November 7, 2018
Upload: September 15, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


The link is very old (2013). It recommends using gksudo or gksu for graphical applications but both of those are becoming obsolete. Later on the accepted answer also suggests sudo -H though.

The general consensus in the Ask Ubuntu community recently is to use:

sudo -H gedit /path/to/filename

The only problem remains that sudo doesn’t have a profile for tab settings, extensions, word wrap, font name, font size, etc. You can inherit these from your user profile though with a wrapper script like this: How can I sync my root gedit with my user gedit's preferences?

⇧ How can I install TLP in Ubuntu 18.04? dconf database how to remove duplicate & triplicates?  β‡©