timeout in locking authority file (vnc service)
There are some pages about timeout in locking authority file /root/.xauth
but I really don't understand what is the root of the problem.
As I start vnc service, I see:
root@cluster:mahmood# /etc/init.d/vncserver start
Starting VNC server: 1:vahidms xauth: timeout in locking authority file /root/.xauthVdNayr
New 'cluster.scu:1 (vahidms)' desktop is cluster.scu:1
Starting applications specified in /home/vahidms/.vnc/xstartup
Log file is /home/vahidms/.vnc/cluster.scu:1.log
Although the command is run by root, but it seems that it wants to access /root/.xauthVdNayr on behalf of /home/vahidms (a user).
So, why?
UPDATE 1
Please see the output of the commands as stated in the answer
root@cluster:~# ls -l /etc/init.d/vncserver
-rwxr-xr-x 1 root root 3126 Dec 8 2011 /etc/init.d/vncserver
root@cluster:~# grep -i xauth /etc/init.d/vncserver
root@cluster:~# env | grep XAUTHORITY
root@cluster:~# su - vahidms
vahidms@cluster:~$ env | grep XAUTHORITY
vahidms@cluster:~$ exit
logout
root@cluster:~# lslocks
-bash: lslocks: command not found
UPDATE 2
Please see the related output. I wonder why the lslocks
command is not available.
root@cluster:~# yum list | grep util-linux-ng.x86_64
util-linux-ng.x86_64 2.17.2-12.18.el6 @base
root@cluster:~# find / -name lslocks
root@cluster:~# grep -i xauth /usr/bin/vncserver
$xauth = "xauth";
$xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority";
open (XAUTH, "|xauth -f $xauthorityFile source -");
print XAUTH "add $host:$displayNumber . $cookien";
print XAUTH "add $host/unix:$displayNumber . $cookien";
close XAUTH;
$cmd .= " -auth $xauthorityFile";
if (-x "/usr/X11R6/bin/xauth") {
$xauth = "/usr/X11R6/bin/xauth";
foreach $cmd ("xauth") {
root@cluster:~# grep -i env /etc/init.d/vncserver
root@cluster:~# grep -i env /etc/rc.d/init.d/vncserver
root@cluster:~#
Any idea?
centos vnc xauth
add a comment |
There are some pages about timeout in locking authority file /root/.xauth
but I really don't understand what is the root of the problem.
As I start vnc service, I see:
root@cluster:mahmood# /etc/init.d/vncserver start
Starting VNC server: 1:vahidms xauth: timeout in locking authority file /root/.xauthVdNayr
New 'cluster.scu:1 (vahidms)' desktop is cluster.scu:1
Starting applications specified in /home/vahidms/.vnc/xstartup
Log file is /home/vahidms/.vnc/cluster.scu:1.log
Although the command is run by root, but it seems that it wants to access /root/.xauthVdNayr on behalf of /home/vahidms (a user).
So, why?
UPDATE 1
Please see the output of the commands as stated in the answer
root@cluster:~# ls -l /etc/init.d/vncserver
-rwxr-xr-x 1 root root 3126 Dec 8 2011 /etc/init.d/vncserver
root@cluster:~# grep -i xauth /etc/init.d/vncserver
root@cluster:~# env | grep XAUTHORITY
root@cluster:~# su - vahidms
vahidms@cluster:~$ env | grep XAUTHORITY
vahidms@cluster:~$ exit
logout
root@cluster:~# lslocks
-bash: lslocks: command not found
UPDATE 2
Please see the related output. I wonder why the lslocks
command is not available.
root@cluster:~# yum list | grep util-linux-ng.x86_64
util-linux-ng.x86_64 2.17.2-12.18.el6 @base
root@cluster:~# find / -name lslocks
root@cluster:~# grep -i xauth /usr/bin/vncserver
$xauth = "xauth";
$xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority";
open (XAUTH, "|xauth -f $xauthorityFile source -");
print XAUTH "add $host:$displayNumber . $cookien";
print XAUTH "add $host/unix:$displayNumber . $cookien";
close XAUTH;
$cmd .= " -auth $xauthorityFile";
if (-x "/usr/X11R6/bin/xauth") {
$xauth = "/usr/X11R6/bin/xauth";
foreach $cmd ("xauth") {
root@cluster:~# grep -i env /etc/init.d/vncserver
root@cluster:~# grep -i env /etc/rc.d/init.d/vncserver
root@cluster:~#
Any idea?
centos vnc xauth
add a comment |
There are some pages about timeout in locking authority file /root/.xauth
but I really don't understand what is the root of the problem.
As I start vnc service, I see:
root@cluster:mahmood# /etc/init.d/vncserver start
Starting VNC server: 1:vahidms xauth: timeout in locking authority file /root/.xauthVdNayr
New 'cluster.scu:1 (vahidms)' desktop is cluster.scu:1
Starting applications specified in /home/vahidms/.vnc/xstartup
Log file is /home/vahidms/.vnc/cluster.scu:1.log
Although the command is run by root, but it seems that it wants to access /root/.xauthVdNayr on behalf of /home/vahidms (a user).
So, why?
UPDATE 1
Please see the output of the commands as stated in the answer
root@cluster:~# ls -l /etc/init.d/vncserver
-rwxr-xr-x 1 root root 3126 Dec 8 2011 /etc/init.d/vncserver
root@cluster:~# grep -i xauth /etc/init.d/vncserver
root@cluster:~# env | grep XAUTHORITY
root@cluster:~# su - vahidms
vahidms@cluster:~$ env | grep XAUTHORITY
vahidms@cluster:~$ exit
logout
root@cluster:~# lslocks
-bash: lslocks: command not found
UPDATE 2
Please see the related output. I wonder why the lslocks
command is not available.
root@cluster:~# yum list | grep util-linux-ng.x86_64
util-linux-ng.x86_64 2.17.2-12.18.el6 @base
root@cluster:~# find / -name lslocks
root@cluster:~# grep -i xauth /usr/bin/vncserver
$xauth = "xauth";
$xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority";
open (XAUTH, "|xauth -f $xauthorityFile source -");
print XAUTH "add $host:$displayNumber . $cookien";
print XAUTH "add $host/unix:$displayNumber . $cookien";
close XAUTH;
$cmd .= " -auth $xauthorityFile";
if (-x "/usr/X11R6/bin/xauth") {
$xauth = "/usr/X11R6/bin/xauth";
foreach $cmd ("xauth") {
root@cluster:~# grep -i env /etc/init.d/vncserver
root@cluster:~# grep -i env /etc/rc.d/init.d/vncserver
root@cluster:~#
Any idea?
centos vnc xauth
There are some pages about timeout in locking authority file /root/.xauth
but I really don't understand what is the root of the problem.
As I start vnc service, I see:
root@cluster:mahmood# /etc/init.d/vncserver start
Starting VNC server: 1:vahidms xauth: timeout in locking authority file /root/.xauthVdNayr
New 'cluster.scu:1 (vahidms)' desktop is cluster.scu:1
Starting applications specified in /home/vahidms/.vnc/xstartup
Log file is /home/vahidms/.vnc/cluster.scu:1.log
Although the command is run by root, but it seems that it wants to access /root/.xauthVdNayr on behalf of /home/vahidms (a user).
So, why?
UPDATE 1
Please see the output of the commands as stated in the answer
root@cluster:~# ls -l /etc/init.d/vncserver
-rwxr-xr-x 1 root root 3126 Dec 8 2011 /etc/init.d/vncserver
root@cluster:~# grep -i xauth /etc/init.d/vncserver
root@cluster:~# env | grep XAUTHORITY
root@cluster:~# su - vahidms
vahidms@cluster:~$ env | grep XAUTHORITY
vahidms@cluster:~$ exit
logout
root@cluster:~# lslocks
-bash: lslocks: command not found
UPDATE 2
Please see the related output. I wonder why the lslocks
command is not available.
root@cluster:~# yum list | grep util-linux-ng.x86_64
util-linux-ng.x86_64 2.17.2-12.18.el6 @base
root@cluster:~# find / -name lslocks
root@cluster:~# grep -i xauth /usr/bin/vncserver
$xauth = "xauth";
$xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority";
open (XAUTH, "|xauth -f $xauthorityFile source -");
print XAUTH "add $host:$displayNumber . $cookien";
print XAUTH "add $host/unix:$displayNumber . $cookien";
close XAUTH;
$cmd .= " -auth $xauthorityFile";
if (-x "/usr/X11R6/bin/xauth") {
$xauth = "/usr/X11R6/bin/xauth";
foreach $cmd ("xauth") {
root@cluster:~# grep -i env /etc/init.d/vncserver
root@cluster:~# grep -i env /etc/rc.d/init.d/vncserver
root@cluster:~#
Any idea?
centos vnc xauth
centos vnc xauth
edited May 25 '16 at 20:23
mahmood
asked May 25 '16 at 9:17
mahmoodmahmood
3702822
3702822
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
vncserver
is a perl script, so you look inside to see that it runs xauth
to add a newly created random MIT-MAGIC-COOKIE-1
value (got from mcookie
) for the server it is about to start. By default it tells xauth to use the file ~/.Xauthority
, but you seem to have set XAUTHORITY=/root/.xauthVdNayr
in your environment, and this takes precedence.
The authority file to use is normally in the home directory of the user that will be creating clients for the server.
You are probably inheriting the XAUTHORITY
from xdm
or some similar display manager, and it is probably the process that has locked the file. Use command lslocks
to list which commands have which files locked.
You can simply unset
the XAUTHORITY environment variable so that the default file is used.
Please see the updated post
– mahmood
May 25 '16 at 18:33
I'm assuming/etc/init.d/vncserver
runs/usr/bin/vncserver
or similar. I have fedora 22 which I thought would be similar in some ways with centos. You need to check the env inside/etc/init.d/vncserver
for XAUTHORITY. You might findlslocks
in the packageutil-linux
.
– meuh
May 25 '16 at 18:43
Please see the updated post. Any more idea?
– mahmood
May 25 '16 at 20:24
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f285352%2ftimeout-in-locking-authority-file-vnc-service%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
vncserver
is a perl script, so you look inside to see that it runs xauth
to add a newly created random MIT-MAGIC-COOKIE-1
value (got from mcookie
) for the server it is about to start. By default it tells xauth to use the file ~/.Xauthority
, but you seem to have set XAUTHORITY=/root/.xauthVdNayr
in your environment, and this takes precedence.
The authority file to use is normally in the home directory of the user that will be creating clients for the server.
You are probably inheriting the XAUTHORITY
from xdm
or some similar display manager, and it is probably the process that has locked the file. Use command lslocks
to list which commands have which files locked.
You can simply unset
the XAUTHORITY environment variable so that the default file is used.
Please see the updated post
– mahmood
May 25 '16 at 18:33
I'm assuming/etc/init.d/vncserver
runs/usr/bin/vncserver
or similar. I have fedora 22 which I thought would be similar in some ways with centos. You need to check the env inside/etc/init.d/vncserver
for XAUTHORITY. You might findlslocks
in the packageutil-linux
.
– meuh
May 25 '16 at 18:43
Please see the updated post. Any more idea?
– mahmood
May 25 '16 at 20:24
add a comment |
vncserver
is a perl script, so you look inside to see that it runs xauth
to add a newly created random MIT-MAGIC-COOKIE-1
value (got from mcookie
) for the server it is about to start. By default it tells xauth to use the file ~/.Xauthority
, but you seem to have set XAUTHORITY=/root/.xauthVdNayr
in your environment, and this takes precedence.
The authority file to use is normally in the home directory of the user that will be creating clients for the server.
You are probably inheriting the XAUTHORITY
from xdm
or some similar display manager, and it is probably the process that has locked the file. Use command lslocks
to list which commands have which files locked.
You can simply unset
the XAUTHORITY environment variable so that the default file is used.
Please see the updated post
– mahmood
May 25 '16 at 18:33
I'm assuming/etc/init.d/vncserver
runs/usr/bin/vncserver
or similar. I have fedora 22 which I thought would be similar in some ways with centos. You need to check the env inside/etc/init.d/vncserver
for XAUTHORITY. You might findlslocks
in the packageutil-linux
.
– meuh
May 25 '16 at 18:43
Please see the updated post. Any more idea?
– mahmood
May 25 '16 at 20:24
add a comment |
vncserver
is a perl script, so you look inside to see that it runs xauth
to add a newly created random MIT-MAGIC-COOKIE-1
value (got from mcookie
) for the server it is about to start. By default it tells xauth to use the file ~/.Xauthority
, but you seem to have set XAUTHORITY=/root/.xauthVdNayr
in your environment, and this takes precedence.
The authority file to use is normally in the home directory of the user that will be creating clients for the server.
You are probably inheriting the XAUTHORITY
from xdm
or some similar display manager, and it is probably the process that has locked the file. Use command lslocks
to list which commands have which files locked.
You can simply unset
the XAUTHORITY environment variable so that the default file is used.
vncserver
is a perl script, so you look inside to see that it runs xauth
to add a newly created random MIT-MAGIC-COOKIE-1
value (got from mcookie
) for the server it is about to start. By default it tells xauth to use the file ~/.Xauthority
, but you seem to have set XAUTHORITY=/root/.xauthVdNayr
in your environment, and this takes precedence.
The authority file to use is normally in the home directory of the user that will be creating clients for the server.
You are probably inheriting the XAUTHORITY
from xdm
or some similar display manager, and it is probably the process that has locked the file. Use command lslocks
to list which commands have which files locked.
You can simply unset
the XAUTHORITY environment variable so that the default file is used.
answered May 25 '16 at 17:17
meuhmeuh
32.4k12054
32.4k12054
Please see the updated post
– mahmood
May 25 '16 at 18:33
I'm assuming/etc/init.d/vncserver
runs/usr/bin/vncserver
or similar. I have fedora 22 which I thought would be similar in some ways with centos. You need to check the env inside/etc/init.d/vncserver
for XAUTHORITY. You might findlslocks
in the packageutil-linux
.
– meuh
May 25 '16 at 18:43
Please see the updated post. Any more idea?
– mahmood
May 25 '16 at 20:24
add a comment |
Please see the updated post
– mahmood
May 25 '16 at 18:33
I'm assuming/etc/init.d/vncserver
runs/usr/bin/vncserver
or similar. I have fedora 22 which I thought would be similar in some ways with centos. You need to check the env inside/etc/init.d/vncserver
for XAUTHORITY. You might findlslocks
in the packageutil-linux
.
– meuh
May 25 '16 at 18:43
Please see the updated post. Any more idea?
– mahmood
May 25 '16 at 20:24
Please see the updated post
– mahmood
May 25 '16 at 18:33
Please see the updated post
– mahmood
May 25 '16 at 18:33
I'm assuming
/etc/init.d/vncserver
runs /usr/bin/vncserver
or similar. I have fedora 22 which I thought would be similar in some ways with centos. You need to check the env inside /etc/init.d/vncserver
for XAUTHORITY. You might find lslocks
in the package util-linux
.– meuh
May 25 '16 at 18:43
I'm assuming
/etc/init.d/vncserver
runs /usr/bin/vncserver
or similar. I have fedora 22 which I thought would be similar in some ways with centos. You need to check the env inside /etc/init.d/vncserver
for XAUTHORITY. You might find lslocks
in the package util-linux
.– meuh
May 25 '16 at 18:43
Please see the updated post. Any more idea?
– mahmood
May 25 '16 at 20:24
Please see the updated post. Any more idea?
– mahmood
May 25 '16 at 20:24
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.
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%2f285352%2ftimeout-in-locking-authority-file-vnc-service%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