Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install a .deb package in Natty using gdebi package installer:

gdebi package installer

But when I click "Install", the following error message comes up:

Error message

Also, when I try to install anything from the Software Center, nothing happens. I'm guessing this is related to the above error.

Could someone please help me out with this?

EDIT: My home folder does not have a .Xauthority file.

share|improve this question
    
Can you open a terminal, enter ls -l .Xauthority and add the output to your question? –  qbi May 5 '11 at 12:23

2 Answers 2

up vote 3 down vote accepted

Please check the permission and username, usergroup of .Xauthority

ls -la ~/.Xauthority

It needs to be owned by you and the permissions should be -rw-------
To alter name and group:

sudo chown youruser:youruser ~/.Xauthority

To alter persmission to -rw-------
chmod 600 ~/.Xauthority

(Replace youruser by your username.)

If this is the cause: Did you install anything prior to this package or issue sudo commands? There are some things in the past that I saw messing up the permission for this file. Notably things like samba, sudo ssh.

share|improve this answer
    
The problem seems to be occurring randomly. I tried installing the package 20 minutes after posting this question, and it worked! So the problem has been solved (temporarily atleast). Surprisingly, the .Xauthority file does not exist in my home folder. Should I create an empty file with the above permissions? Will that be a permanent fix? –  Vicky Chijwani May 7 '11 at 8:31
    
And, btw, there seems to be a tiny syntax error in your answer: The first command should be "ls -la ~/.Xauthority" :) –  Vicky Chijwani May 7 '11 at 8:41
    
The file should be automatically created on log-on. It looks like some package is messing up the file. From what I have read candidates are: Gnome3, ssh and/or a wrongly type sudo command in your home dir. –  Rinzwind May 7 '11 at 8:43
    
@Vicky Chijwani: fixed. thanks :) –  Rinzwind May 7 '11 at 8:44
    
of the possible causes you mention, I think ssh might be the culprit. I don't have GNOME3 installed. So should I create the .Xauthority file myself and change its permissions to the appropriate ones? –  Vicky Chijwani May 7 '11 at 9:38

Here is what I found by simple Googling,

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.

Credits eightmillion

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.