Cannot open display error when I run sudo gedit on Ubuntu 14.04.5
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
-1
down vote
favorite
solitude@Solitude:~/Desktop$ sudo gedit ~/.bashrc
error: XDG_RUNTIME_DIR not set in the environment.
(gedit:12631): Gtk-WARNING **: cannot open display:
sudo gedit hadoop environment
add a comment |Â
up vote
-1
down vote
favorite
solitude@Solitude:~/Desktop$ sudo gedit ~/.bashrc
error: XDG_RUNTIME_DIR not set in the environment.
(gedit:12631): Gtk-WARNING **: cannot open display:
sudo gedit hadoop environment
1
You can't run X11 apps without an X11 display for them to connect to. You might want thevi
command instead ofgedit
there.
â dobey
Mar 28 at 15:37
add a comment |Â
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
solitude@Solitude:~/Desktop$ sudo gedit ~/.bashrc
error: XDG_RUNTIME_DIR not set in the environment.
(gedit:12631): Gtk-WARNING **: cannot open display:
sudo gedit hadoop environment
solitude@Solitude:~/Desktop$ sudo gedit ~/.bashrc
error: XDG_RUNTIME_DIR not set in the environment.
(gedit:12631): Gtk-WARNING **: cannot open display:
sudo gedit hadoop environment
sudo gedit hadoop environment
edited Mar 29 at 20:01
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
Zanna
48k13119228
48k13119228
asked Mar 28 at 14:57
![](https://lh4.googleusercontent.com/-IL_ondij_Go/AAAAAAAAAAI/AAAAAAAAACA/C6757kdshmI/photo.jpg?sz=32)
![](https://lh4.googleusercontent.com/-IL_ondij_Go/AAAAAAAAAAI/AAAAAAAAACA/C6757kdshmI/photo.jpg?sz=32)
Varun Sahdev
61
61
1
You can't run X11 apps without an X11 display for them to connect to. You might want thevi
command instead ofgedit
there.
â dobey
Mar 28 at 15:37
add a comment |Â
1
You can't run X11 apps without an X11 display for them to connect to. You might want thevi
command instead ofgedit
there.
â dobey
Mar 28 at 15:37
1
1
You can't run X11 apps without an X11 display for them to connect to. You might want the
vi
command instead of gedit
there.â dobey
Mar 28 at 15:37
You can't run X11 apps without an X11 display for them to connect to. You might want the
vi
command instead of gedit
there.â dobey
Mar 28 at 15:37
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
You should never use normal sudo to start graphical applications as root. For a complete explanation of this read the answers to this question: Why should users never use normal sudo to start graphical applications?.
Nautilus Admin (nautilus-admin) is a simple Python extension for the Nautilus file manager that adds some administrative actions to the right-click menu:
- Open as Administrator: opens a folder in a new Nautilus window running with administrator (root) privileges.
- Edit as Administrator: opens a file in a Gedit window running with administrator (root) privileges.
To install Nautilus Admin in all currently supported versions of Ubuntu open the terminal and type:
sudo apt install nautilus-admin
An alternative way of editing the same file is to use the system's default text editor program that is designed to run from the terminal without needing any other graphical environment.
sudoedit path/to/file
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
You should never use normal sudo to start graphical applications as root. For a complete explanation of this read the answers to this question: Why should users never use normal sudo to start graphical applications?.
Nautilus Admin (nautilus-admin) is a simple Python extension for the Nautilus file manager that adds some administrative actions to the right-click menu:
- Open as Administrator: opens a folder in a new Nautilus window running with administrator (root) privileges.
- Edit as Administrator: opens a file in a Gedit window running with administrator (root) privileges.
To install Nautilus Admin in all currently supported versions of Ubuntu open the terminal and type:
sudo apt install nautilus-admin
An alternative way of editing the same file is to use the system's default text editor program that is designed to run from the terminal without needing any other graphical environment.
sudoedit path/to/file
add a comment |Â
up vote
2
down vote
You should never use normal sudo to start graphical applications as root. For a complete explanation of this read the answers to this question: Why should users never use normal sudo to start graphical applications?.
Nautilus Admin (nautilus-admin) is a simple Python extension for the Nautilus file manager that adds some administrative actions to the right-click menu:
- Open as Administrator: opens a folder in a new Nautilus window running with administrator (root) privileges.
- Edit as Administrator: opens a file in a Gedit window running with administrator (root) privileges.
To install Nautilus Admin in all currently supported versions of Ubuntu open the terminal and type:
sudo apt install nautilus-admin
An alternative way of editing the same file is to use the system's default text editor program that is designed to run from the terminal without needing any other graphical environment.
sudoedit path/to/file
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You should never use normal sudo to start graphical applications as root. For a complete explanation of this read the answers to this question: Why should users never use normal sudo to start graphical applications?.
Nautilus Admin (nautilus-admin) is a simple Python extension for the Nautilus file manager that adds some administrative actions to the right-click menu:
- Open as Administrator: opens a folder in a new Nautilus window running with administrator (root) privileges.
- Edit as Administrator: opens a file in a Gedit window running with administrator (root) privileges.
To install Nautilus Admin in all currently supported versions of Ubuntu open the terminal and type:
sudo apt install nautilus-admin
An alternative way of editing the same file is to use the system's default text editor program that is designed to run from the terminal without needing any other graphical environment.
sudoedit path/to/file
You should never use normal sudo to start graphical applications as root. For a complete explanation of this read the answers to this question: Why should users never use normal sudo to start graphical applications?.
Nautilus Admin (nautilus-admin) is a simple Python extension for the Nautilus file manager that adds some administrative actions to the right-click menu:
- Open as Administrator: opens a folder in a new Nautilus window running with administrator (root) privileges.
- Edit as Administrator: opens a file in a Gedit window running with administrator (root) privileges.
To install Nautilus Admin in all currently supported versions of Ubuntu open the terminal and type:
sudo apt install nautilus-admin
An alternative way of editing the same file is to use the system's default text editor program that is designed to run from the terminal without needing any other graphical environment.
sudoedit path/to/file
edited Jun 2 at 23:41
answered Mar 28 at 15:26
![](https://i.stack.imgur.com/zqElV.png?s=32&g=1)
![](https://i.stack.imgur.com/zqElV.png?s=32&g=1)
karel
50.7k11107127
50.7k11107127
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1019996%2fcannot-open-display-error-when-i-run-sudo-gedit-on-ubuntu-14-04-5%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
You can't run X11 apps without an X11 display for them to connect to. You might want the
vi
command instead ofgedit
there.â dobey
Mar 28 at 15:37