Ask Your Question

nautilus / gedit - cannot open display

asked 2017-01-06 09:53:27 -0500

noammo gravatar image

Hi, When i'm trying to run

sudo nautilus


sudo gedit

I get this error

[noam@noam ~]$

[noam@noam ~]$ sudo nautilus

No protocol specified

Unable to init server: Could not connect: Connection refused

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

[noam@noam ~]$

why ? how can I fix this ?

and I think that its happening just after I tried to install kde - delete kde (and all the softwares)

Thanks in advance, Noac

edit retag flag offensive close merge delete


1 Answer

Sort by ยป oldest newest most voted

answered 2017-01-06 11:13:12 -0500

aeperezt gravatar image

When you try to load nautilus as root with sudo it will look for the display session for the root user, which do not have one.

To make it work try it like this:

sudo export DISPLAY=:0; nautilus

But best way will be this option, that will ask for sudo password

nautilus admin:///

Hope this help

edit flag offensive delete link more


this is dont working.. im getting this error

sudo: export: command not found

and a few days ago, its worked good, and i think that its maybe dont working because the kde (which i tried to install) - but maybe its just a coincidence.. (and its not related to this problem)

noammo gravatar imagenoammo ( 2017-01-06 13:37:57 -0500 )edit

No idea did you try it with admin:/// ?

aeperezt gravatar imageaeperezt ( 2017-01-06 17:42:10 -0500 )edit

Just do sudo export DISPLAY=:0; nautilus admin:///

iamthinkking gravatar imageiamthinkking ( 2017-01-11 21:40:10 -0500 )edit

oh if I type this

sudo export DISPLAY=:0; nautilus admin:///

so it opens the nautilus, but without root access so how can I open nautilus, but with root access ?

noammo gravatar imagenoammo ( 2017-01-14 06:13:23 -0500 )edit

@noammonautilus admin:/// opens nautilus but prompts you to enter the admin/root password to enable root privileges when using the application.

iamthinkking gravatar imageiamthinkking ( 2017-01-17 07:05:09 -0500 )edit

Question Tools

1 follower


Asked: 2017-01-06 09:53:27 -0500

Seen: 2,108 times

Last updated: Jan 06 '17