How to create Xauthority file?
up vote
0
down vote
favorite
I am trying to run nautilus with gksudo nautilus. However, whenever I try, this dialog appears:

Along with the following message in the terminal:
Error copying '/home/.../.Xauthority' to '/tmp/libgksu-v8QBGW': No
such file or directory
Then I tried to create a new ~/.Xauthority file by sudo touch ~/.Xauthority. Once I run gksudo nautilus, a dialog asks for my password (also, I cannot write in the textbox, only paste. So I paste my password...)
The following error shows:
Unable to init server: Could not connect: Connection refused
(nautilus:4202): Gtk-WARNING **: cannot open display: :0
I've looked everywhere but cannot find a solution. Also, I cannot open any other visual interface using root, like gksudo synaptic, as the same happens. Please help.
sudo nautilus
add a comment |
up vote
0
down vote
favorite
I am trying to run nautilus with gksudo nautilus. However, whenever I try, this dialog appears:

Along with the following message in the terminal:
Error copying '/home/.../.Xauthority' to '/tmp/libgksu-v8QBGW': No
such file or directory
Then I tried to create a new ~/.Xauthority file by sudo touch ~/.Xauthority. Once I run gksudo nautilus, a dialog asks for my password (also, I cannot write in the textbox, only paste. So I paste my password...)
The following error shows:
Unable to init server: Could not connect: Connection refused
(nautilus:4202): Gtk-WARNING **: cannot open display: :0
I've looked everywhere but cannot find a solution. Also, I cannot open any other visual interface using root, like gksudo synaptic, as the same happens. Please help.
sudo nautilus
1
askubuntu.com/questions/961967/…
– muru
Apr 9 at 8:41
Thank you, @muru. I had just solved it by doing "xhost +", then I saw the link you posted, which is more appropriate. I wish I could choose your comment as a correct answer.
– lucasdelevy
Apr 10 at 6:13
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to run nautilus with gksudo nautilus. However, whenever I try, this dialog appears:

Along with the following message in the terminal:
Error copying '/home/.../.Xauthority' to '/tmp/libgksu-v8QBGW': No
such file or directory
Then I tried to create a new ~/.Xauthority file by sudo touch ~/.Xauthority. Once I run gksudo nautilus, a dialog asks for my password (also, I cannot write in the textbox, only paste. So I paste my password...)
The following error shows:
Unable to init server: Could not connect: Connection refused
(nautilus:4202): Gtk-WARNING **: cannot open display: :0
I've looked everywhere but cannot find a solution. Also, I cannot open any other visual interface using root, like gksudo synaptic, as the same happens. Please help.
sudo nautilus
I am trying to run nautilus with gksudo nautilus. However, whenever I try, this dialog appears:

Along with the following message in the terminal:
Error copying '/home/.../.Xauthority' to '/tmp/libgksu-v8QBGW': No
such file or directory
Then I tried to create a new ~/.Xauthority file by sudo touch ~/.Xauthority. Once I run gksudo nautilus, a dialog asks for my password (also, I cannot write in the textbox, only paste. So I paste my password...)
The following error shows:
Unable to init server: Could not connect: Connection refused
(nautilus:4202): Gtk-WARNING **: cannot open display: :0
I've looked everywhere but cannot find a solution. Also, I cannot open any other visual interface using root, like gksudo synaptic, as the same happens. Please help.
sudo nautilus
sudo nautilus
asked Apr 9 at 8:25
lucasdelevy
11
11
1
askubuntu.com/questions/961967/…
– muru
Apr 9 at 8:41
Thank you, @muru. I had just solved it by doing "xhost +", then I saw the link you posted, which is more appropriate. I wish I could choose your comment as a correct answer.
– lucasdelevy
Apr 10 at 6:13
add a comment |
1
askubuntu.com/questions/961967/…
– muru
Apr 9 at 8:41
Thank you, @muru. I had just solved it by doing "xhost +", then I saw the link you posted, which is more appropriate. I wish I could choose your comment as a correct answer.
– lucasdelevy
Apr 10 at 6:13
1
1
askubuntu.com/questions/961967/…
– muru
Apr 9 at 8:41
askubuntu.com/questions/961967/…
– muru
Apr 9 at 8:41
Thank you, @muru. I had just solved it by doing "xhost +", then I saw the link you posted, which is more appropriate. I wish I could choose your comment as a correct answer.
– lucasdelevy
Apr 10 at 6:13
Thank you, @muru. I had just solved it by doing "xhost +", then I saw the link you posted, which is more appropriate. I wish I could choose your comment as a correct answer.
– lucasdelevy
Apr 10 at 6:13
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
As muru suggested with the URL, doing xhost si:localuser:root solved the issue. If he/she wants to answer the question, I will accept it as the correct one.
add a comment |
up vote
0
down vote
This looks like Ubuntu. I had a similar issue and found out that GDM is starting two Xorg servers (more detail here). What this meant for me was that there were two sockets being created in /tmp/.X11-unix. The value of env var $DISPLAY shows which display gksudo and other graphic applications are using when you try to run them as root from the terminal.
The value ':0' is now pointing to the greeter Xorg instance and the actual user Xorg session is now located at ':1'.
Double check ps aux | grep Xorg then ls /tmp/.X11-unix to see what I mean and if this applies to you. If it does, simply changing the value of $DISPLAY to be ':1' upon login to thwart these display errors is preferred to
xhost si:localuser:root which can compromise X11 security.
Thanks for your answer. I did what you said and got the error(gksudo:16130): Gtk-WARNING **: cannot open display: 1. When I dols /tmp/.X11-unix, I get:X0 X1024. So, even changing DISPLAY=1024 gets me the same error.
– lucasdelevy
May 28 at 6:37
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
As muru suggested with the URL, doing xhost si:localuser:root solved the issue. If he/she wants to answer the question, I will accept it as the correct one.
add a comment |
up vote
0
down vote
As muru suggested with the URL, doing xhost si:localuser:root solved the issue. If he/she wants to answer the question, I will accept it as the correct one.
add a comment |
up vote
0
down vote
up vote
0
down vote
As muru suggested with the URL, doing xhost si:localuser:root solved the issue. If he/she wants to answer the question, I will accept it as the correct one.
As muru suggested with the URL, doing xhost si:localuser:root solved the issue. If he/she wants to answer the question, I will accept it as the correct one.
answered Apr 10 at 6:15
lucasdelevy
11
11
add a comment |
add a comment |
up vote
0
down vote
This looks like Ubuntu. I had a similar issue and found out that GDM is starting two Xorg servers (more detail here). What this meant for me was that there were two sockets being created in /tmp/.X11-unix. The value of env var $DISPLAY shows which display gksudo and other graphic applications are using when you try to run them as root from the terminal.
The value ':0' is now pointing to the greeter Xorg instance and the actual user Xorg session is now located at ':1'.
Double check ps aux | grep Xorg then ls /tmp/.X11-unix to see what I mean and if this applies to you. If it does, simply changing the value of $DISPLAY to be ':1' upon login to thwart these display errors is preferred to
xhost si:localuser:root which can compromise X11 security.
Thanks for your answer. I did what you said and got the error(gksudo:16130): Gtk-WARNING **: cannot open display: 1. When I dols /tmp/.X11-unix, I get:X0 X1024. So, even changing DISPLAY=1024 gets me the same error.
– lucasdelevy
May 28 at 6:37
add a comment |
up vote
0
down vote
This looks like Ubuntu. I had a similar issue and found out that GDM is starting two Xorg servers (more detail here). What this meant for me was that there were two sockets being created in /tmp/.X11-unix. The value of env var $DISPLAY shows which display gksudo and other graphic applications are using when you try to run them as root from the terminal.
The value ':0' is now pointing to the greeter Xorg instance and the actual user Xorg session is now located at ':1'.
Double check ps aux | grep Xorg then ls /tmp/.X11-unix to see what I mean and if this applies to you. If it does, simply changing the value of $DISPLAY to be ':1' upon login to thwart these display errors is preferred to
xhost si:localuser:root which can compromise X11 security.
Thanks for your answer. I did what you said and got the error(gksudo:16130): Gtk-WARNING **: cannot open display: 1. When I dols /tmp/.X11-unix, I get:X0 X1024. So, even changing DISPLAY=1024 gets me the same error.
– lucasdelevy
May 28 at 6:37
add a comment |
up vote
0
down vote
up vote
0
down vote
This looks like Ubuntu. I had a similar issue and found out that GDM is starting two Xorg servers (more detail here). What this meant for me was that there were two sockets being created in /tmp/.X11-unix. The value of env var $DISPLAY shows which display gksudo and other graphic applications are using when you try to run them as root from the terminal.
The value ':0' is now pointing to the greeter Xorg instance and the actual user Xorg session is now located at ':1'.
Double check ps aux | grep Xorg then ls /tmp/.X11-unix to see what I mean and if this applies to you. If it does, simply changing the value of $DISPLAY to be ':1' upon login to thwart these display errors is preferred to
xhost si:localuser:root which can compromise X11 security.
This looks like Ubuntu. I had a similar issue and found out that GDM is starting two Xorg servers (more detail here). What this meant for me was that there were two sockets being created in /tmp/.X11-unix. The value of env var $DISPLAY shows which display gksudo and other graphic applications are using when you try to run them as root from the terminal.
The value ':0' is now pointing to the greeter Xorg instance and the actual user Xorg session is now located at ':1'.
Double check ps aux | grep Xorg then ls /tmp/.X11-unix to see what I mean and if this applies to you. If it does, simply changing the value of $DISPLAY to be ':1' upon login to thwart these display errors is preferred to
xhost si:localuser:root which can compromise X11 security.
answered May 25 at 20:46
brianclements
1335
1335
Thanks for your answer. I did what you said and got the error(gksudo:16130): Gtk-WARNING **: cannot open display: 1. When I dols /tmp/.X11-unix, I get:X0 X1024. So, even changing DISPLAY=1024 gets me the same error.
– lucasdelevy
May 28 at 6:37
add a comment |
Thanks for your answer. I did what you said and got the error(gksudo:16130): Gtk-WARNING **: cannot open display: 1. When I dols /tmp/.X11-unix, I get:X0 X1024. So, even changing DISPLAY=1024 gets me the same error.
– lucasdelevy
May 28 at 6:37
Thanks for your answer. I did what you said and got the error
(gksudo:16130): Gtk-WARNING **: cannot open display: 1. When I do ls /tmp/.X11-unix, I get: X0 X1024. So, even changing DISPLAY=1024 gets me the same error.– lucasdelevy
May 28 at 6:37
Thanks for your answer. I did what you said and got the error
(gksudo:16130): Gtk-WARNING **: cannot open display: 1. When I do ls /tmp/.X11-unix, I get: X0 X1024. So, even changing DISPLAY=1024 gets me the same error.– lucasdelevy
May 28 at 6:37
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f436476%2fhow-to-create-xauthority-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
askubuntu.com/questions/961967/…
– muru
Apr 9 at 8:41
Thank you, @muru. I had just solved it by doing "xhost +", then I saw the link you posted, which is more appropriate. I wish I could choose your comment as a correct answer.
– lucasdelevy
Apr 10 at 6:13