Unable to launch gedit with sudo
You should be using gksu
to launch graphical things as root.
gksu gedit /var/lib/dpkg/status
There is a known bug in 16.04 preventing root gedit from displaying the menu bar, making it somewhat useless.
The solution is to preserve environment variables while launching gedit. (Nautilus and Terminal have the same problem and fix, by the way).
gksu -k gedit