1

I have recently installed Ubuntu 17.10 and every time I try to open a graphical app as root (with sudo) these are the error messages that come out.
I have already tried xhost +chips (my username) and xhost +root but this is the error message that I get: xhost: bad hostname "root".

chips@DELL:~$ sudo nautilus
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused

(nautilus:2254): Gtk-WARNING **: cannot open display: :0

chips@DELL:~$ sudo wireshark 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Invalid MIT-MAGIC-COOKIE-1 keyQXcbConnection: Could not connect to display :0
Aborted

chips@DELL:~$ sudo rhythmbox
error: XDG_RUNTIME_DIR not set in the environment.
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
Cannot open display: 
Run 'rhythmbox --help' to see a full list of available command line options.
Chips
  • 11
  • It does not seem to be the same problem, sorry – Chips Oct 28 '17 at 18:08
  • I am using Ubuntu 17.10 as is so yes I am using Wayland – Chips Oct 28 '17 at 18:14
  • Have you tried nautilus admin:/// (to access /), in general nautilus admin://<path-to-directory>? – pomsky Oct 28 '17 at 18:18
  • Yes, nautilus admin:/// asks for my password and then it starts, but I need it to be working with sudo – Chips Oct 28 '17 at 18:22
  • This trick is from one of the answers of the proposed duplicate. I would suggest you to go through all the answers. "It does seem to be the same problem, sorry" – pomsky Oct 28 '17 at 18:23

0 Answers0