LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-08-2011, 12:19 PM   #1
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Rep: Reputation: 34
"X11 connection rejected because of wrong authentication" for some programs


I get the above error message when I try to run some programs in ssh -X

xterm works fine. But when I do gedit, I get the above error. If I do sudo gedit, then the program runs without the error.

xyes, gnome-calculator, chromium-browser also works. I did a little investigation online, but they usually try to get some X program running. The problem I face is that some programs need me to do sudo in order to make them run. I was wondering why this is required.

EDIT: I killed all gedit on the system, and tried the command again, this time I get:
GConf Error: Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Error connecting: Connection refused)

Last edited by gregorian; 11-08-2011 at 12:29 PM.
 
Old 11-08-2011, 12:50 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Do you have xauth package installed in the machine that runs X server ?
 
Old 11-08-2011, 07:36 PM   #3
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Original Poster
Rep: Reputation: 34
Yes, I do. I have seen approaches that talk about using it, but now that X programs work, I wonder why do only some programs like gedit not work.
 
Old 11-09-2011, 06:16 AM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Maybe check permission on .Xauthority file

ssh <server>
ls -l .Xauthority
 
Old 11-09-2011, 11:12 AM   #5
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Original Poster
Rep: Reputation: 34
I have the permissions. Besides, I can run other X programs. For some reason gedit won't open.
 
Old 11-09-2011, 11:14 AM   #6
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
There must be file permission problem somewhere if you are able to run gedit as root
 
Old 11-12-2011, 10:41 PM   #7
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Try adding this line to /root/.bashrc, replace user with your user name.
Code:
export XAUTHORITY=/home/user/.Xauthority
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"X11 connection rejected because of wrong authentication." and sudo DennisC31 AIX 1 08-24-2011 09:27 AM
X11 connection rejected because of wrong authentication. mschnell Linux - Newbie 1 07-12-2011 12:55 PM
X11 connection rejected because of wrong authentication. vino87 Linux - Desktop 3 06-08-2011 09:45 AM
X11 connection rejected because of wrong authentication???????? Taylrl Linux - Newbie 4 12-07-2010 09:51 AM
X11 connection rejected because of wrong authentication wmasry Linux - Newbie 1 10-19-2010 06:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration