PDA

View Full Version : [ubuntu] unable to copy the user's Xauthorization file?



m1ck
August 23rd, 2008, 07:23 AM
Hi all, i am trying to run the synaptic package manager and keep getting this error

"Failed to run usr/sbin/synaptic as user root
Unable to copy the user's Xauthorization file.".

I also get this error when trying to run the setup login screen, everything was working fine until this morning - i haven't changed or messed around with any settings either so what could be the problem?.

Any help would be greatly appreciated.

eightmillion
August 23rd, 2008, 07:33 AM
First make sure that users .Xauthority file is present in their home directory and make sure it has the correct permissions. running ls -l /home/username/.Xauthority should result in this output:

-rw------- 1 username username 319 2008-08-22 19:35 .Xauthority
If it doesn't look like that, you may have to change the ownership and permissions manually:

sudo chmod 600 /home/username/.Xauthority
sudo chown username:username /home/user/.Xauthority
Be sure to change all instances of username to the correct username.

eightmillion
August 23rd, 2008, 07:34 AM
It's probably a good idea to make sure the user is part of the admin group.

sudo adduser username admin

m1ck
August 23rd, 2008, 07:50 AM
ls -l /home/username/.Xauthority i get "no such file or directory"

also i am part of the admin group

eightmillion
August 23rd, 2008, 08:03 AM
Are the permissions right one the users home directory? The .Xauthority file should be recreated on login if it's missing. Try:

ls -l /home/
The output should look like this:

drwxr-xr-x 61 username username 4096 2008-08-23 02:04 username
If the user's home directory is not owned by that user you'll have to change that:

sudo chown -R username:username /home/username
And I have to ask, you did change username to the appropriate user's name, right?

m1ck
August 23rd, 2008, 08:15 AM
yes it comes up with my username.

"And I have to ask, you did change username to the appropriate user's name, right?"

i only have my username on here if that's what you mean.

eightmillion
August 23rd, 2008, 08:28 AM
You'll probably need to run xauth. Type xauth in a terminal and it will give you a prompt. Run these commands one at a time:

generate :0 . trusted
generate localhost.localdomain/unix:0 . trusted

m1ck
August 23rd, 2008, 09:19 AM
You'll probably need to run xauth. Type xauth in a terminal and it will give you a prompt. Run these commands one at a time:


i got this:
" unable to open display "localhost.localdomain/unix:0."

m1ck
August 23rd, 2008, 09:32 AM
hey i've got it working sort of, i don't know what fixed but it working almost i can access synaptic but when i try to open the "setup login screen" it opens then disappears.

I've also just noticed that if i click on the applications menu nothing happens...places and system list with no problems

eightmillion
August 23rd, 2008, 09:51 AM
It really sounds like you're having issues with permissions. I would go ahead run this command:

sudo chmod -R username:username ~/

m1ck
August 23rd, 2008, 10:44 AM
i keep getting chmod: invalid mode: `myusername:myusername'
Try `chmod --help' for more information

eightmillion
August 23rd, 2008, 10:47 AM
Sorry, that should have been chown.

m1ck
August 23rd, 2008, 11:05 AM
chown: cannot access `/home/username/.gvfs': Permission denied

eightmillion
August 23rd, 2008, 11:10 AM
sudo chown -R username:username ~


.

m1ck
August 23rd, 2008, 11:12 AM
i dunno im totally lost - thanks for your patience though it's really appreciated.

eightmillion
August 23rd, 2008, 11:14 AM
No problem. I don't know why they even put that .gvfs directory in the home directory. It's nothing but trouble.

m1ck
August 23rd, 2008, 01:04 PM
[solved] well...sort of - i have just created another user so my desktop is back to normal.

freesitebuilder
October 5th, 2008, 07:32 PM
I had this problem and have followed the instructions - but now I can't load any sys admin stuff, inlcuding terminal.

If I go to recovery, and use "repair broken packages", will this cure it? As you can tell, I'm not a very experienced user!

ranger1021994
September 12th, 2011, 08:46 AM
I got .gvfs Permission Denied