Permanently adding Xhost as root
![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)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
I'm a newbie Ubuntu user. Every time I log in to my OS, I always add:
xhost +si:localuser:root
How can I add Xhost to root permanently?
My kernel version is 4.13.0-46-generic
.
I have tried this suggestion on the Arch wiki, to edit something in /etc/pam.d/...
, but this doesn't work for me.
command-line xorg 17.10
 |Â
show 2 more comments
up vote
0
down vote
favorite
I'm a newbie Ubuntu user. Every time I log in to my OS, I always add:
xhost +si:localuser:root
How can I add Xhost to root permanently?
My kernel version is 4.13.0-46-generic
.
I have tried this suggestion on the Arch wiki, to edit something in /etc/pam.d/...
, but this doesn't work for me.
command-line xorg 17.10
2
Please explain why you believe you need this. In modern Ubuntu this is not the best method as it is insecure and exploitable. There are probably better methods to get done what you want. And the xhost command does not need to be run as root since you are the owner of the X session. Still bad but a lot better would be to do this:xhost + && sudo gedit && xhost -
you achieve the same for a limited amount of time.
â Rinzwind
10 hours ago
@Rinzwind i think your right about insecure and exploitable, but i always need it every time to edit .txt. if i do "xhost + && sudo gedit && xhost -" it's just one time to edit .txt.
â abu-ahmed al-khatiri
9 hours ago
1
Why do you believe you need to use xhost to edit text files? If you own itvim file.txt
otherwisesudo vim file.txt
. You do not want to use graphical tools to edit txt files from command line since those also tend to change ownership. If you don't like vim, use nano :)
â Rinzwind
9 hours ago
1
Not a good idea but see askubuntu.com/questions/961967/â¦. nano is easier for most new users than vim.sudo nano text.file
â Panther
9 hours ago
1
Possible duplicate of Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
â N0rbert
9 hours ago
 |Â
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm a newbie Ubuntu user. Every time I log in to my OS, I always add:
xhost +si:localuser:root
How can I add Xhost to root permanently?
My kernel version is 4.13.0-46-generic
.
I have tried this suggestion on the Arch wiki, to edit something in /etc/pam.d/...
, but this doesn't work for me.
command-line xorg 17.10
I'm a newbie Ubuntu user. Every time I log in to my OS, I always add:
xhost +si:localuser:root
How can I add Xhost to root permanently?
My kernel version is 4.13.0-46-generic
.
I have tried this suggestion on the Arch wiki, to edit something in /etc/pam.d/...
, but this doesn't work for me.
command-line xorg 17.10
edited 3 hours ago
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
Zanna
47.5k13115226
47.5k13115226
asked 11 hours ago
![](https://lh6.googleusercontent.com/-279cqy_bPB0/AAAAAAAAAAI/AAAAAAAAAAA/AAnnY7piZbpaU-jOK5jjmS36Vja_VuuFBQ/mo/photo.jpg?sz=32)
![](https://lh6.googleusercontent.com/-279cqy_bPB0/AAAAAAAAAAI/AAAAAAAAAAA/AAnnY7piZbpaU-jOK5jjmS36Vja_VuuFBQ/mo/photo.jpg?sz=32)
abu-ahmed al-khatiri
43
43
2
Please explain why you believe you need this. In modern Ubuntu this is not the best method as it is insecure and exploitable. There are probably better methods to get done what you want. And the xhost command does not need to be run as root since you are the owner of the X session. Still bad but a lot better would be to do this:xhost + && sudo gedit && xhost -
you achieve the same for a limited amount of time.
â Rinzwind
10 hours ago
@Rinzwind i think your right about insecure and exploitable, but i always need it every time to edit .txt. if i do "xhost + && sudo gedit && xhost -" it's just one time to edit .txt.
â abu-ahmed al-khatiri
9 hours ago
1
Why do you believe you need to use xhost to edit text files? If you own itvim file.txt
otherwisesudo vim file.txt
. You do not want to use graphical tools to edit txt files from command line since those also tend to change ownership. If you don't like vim, use nano :)
â Rinzwind
9 hours ago
1
Not a good idea but see askubuntu.com/questions/961967/â¦. nano is easier for most new users than vim.sudo nano text.file
â Panther
9 hours ago
1
Possible duplicate of Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
â N0rbert
9 hours ago
 |Â
show 2 more comments
2
Please explain why you believe you need this. In modern Ubuntu this is not the best method as it is insecure and exploitable. There are probably better methods to get done what you want. And the xhost command does not need to be run as root since you are the owner of the X session. Still bad but a lot better would be to do this:xhost + && sudo gedit && xhost -
you achieve the same for a limited amount of time.
â Rinzwind
10 hours ago
@Rinzwind i think your right about insecure and exploitable, but i always need it every time to edit .txt. if i do "xhost + && sudo gedit && xhost -" it's just one time to edit .txt.
â abu-ahmed al-khatiri
9 hours ago
1
Why do you believe you need to use xhost to edit text files? If you own itvim file.txt
otherwisesudo vim file.txt
. You do not want to use graphical tools to edit txt files from command line since those also tend to change ownership. If you don't like vim, use nano :)
â Rinzwind
9 hours ago
1
Not a good idea but see askubuntu.com/questions/961967/â¦. nano is easier for most new users than vim.sudo nano text.file
â Panther
9 hours ago
1
Possible duplicate of Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
â N0rbert
9 hours ago
2
2
Please explain why you believe you need this. In modern Ubuntu this is not the best method as it is insecure and exploitable. There are probably better methods to get done what you want. And the xhost command does not need to be run as root since you are the owner of the X session. Still bad but a lot better would be to do this:
xhost + && sudo gedit && xhost -
you achieve the same for a limited amount of time.â Rinzwind
10 hours ago
Please explain why you believe you need this. In modern Ubuntu this is not the best method as it is insecure and exploitable. There are probably better methods to get done what you want. And the xhost command does not need to be run as root since you are the owner of the X session. Still bad but a lot better would be to do this:
xhost + && sudo gedit && xhost -
you achieve the same for a limited amount of time.â Rinzwind
10 hours ago
@Rinzwind i think your right about insecure and exploitable, but i always need it every time to edit .txt. if i do "xhost + && sudo gedit && xhost -" it's just one time to edit .txt.
â abu-ahmed al-khatiri
9 hours ago
@Rinzwind i think your right about insecure and exploitable, but i always need it every time to edit .txt. if i do "xhost + && sudo gedit && xhost -" it's just one time to edit .txt.
â abu-ahmed al-khatiri
9 hours ago
1
1
Why do you believe you need to use xhost to edit text files? If you own it
vim file.txt
otherwise sudo vim file.txt
. You do not want to use graphical tools to edit txt files from command line since those also tend to change ownership. If you don't like vim, use nano :)â Rinzwind
9 hours ago
Why do you believe you need to use xhost to edit text files? If you own it
vim file.txt
otherwise sudo vim file.txt
. You do not want to use graphical tools to edit txt files from command line since those also tend to change ownership. If you don't like vim, use nano :)â Rinzwind
9 hours ago
1
1
Not a good idea but see askubuntu.com/questions/961967/â¦. nano is easier for most new users than vim.
sudo nano text.file
â Panther
9 hours ago
Not a good idea but see askubuntu.com/questions/961967/â¦. nano is easier for most new users than vim.
sudo nano text.file
â Panther
9 hours ago
1
1
Possible duplicate of Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
â N0rbert
9 hours ago
Possible duplicate of Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
â N0rbert
9 hours ago
 |Â
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f1062317%2fpermanently-adding-xhost-as-root%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
2
Please explain why you believe you need this. In modern Ubuntu this is not the best method as it is insecure and exploitable. There are probably better methods to get done what you want. And the xhost command does not need to be run as root since you are the owner of the X session. Still bad but a lot better would be to do this:
xhost + && sudo gedit && xhost -
you achieve the same for a limited amount of time.â Rinzwind
10 hours ago
@Rinzwind i think your right about insecure and exploitable, but i always need it every time to edit .txt. if i do "xhost + && sudo gedit && xhost -" it's just one time to edit .txt.
â abu-ahmed al-khatiri
9 hours ago
1
Why do you believe you need to use xhost to edit text files? If you own it
vim file.txt
otherwisesudo vim file.txt
. You do not want to use graphical tools to edit txt files from command line since those also tend to change ownership. If you don't like vim, use nano :)â Rinzwind
9 hours ago
1
Not a good idea but see askubuntu.com/questions/961967/â¦. nano is easier for most new users than vim.
sudo nano text.file
â Panther
9 hours ago
1
Possible duplicate of Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
â N0rbert
9 hours ago