Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
06-09-2005, 03:24 AM
|
#1
|
|
Member
Registered: Apr 2005
Posts: 37
Rep:
|
Xlib: connection to ":0.0" refused by server
I am running SuSE v9.2 FTP DVD version.
Quote:
swan@itscpc178:~> su
Password:
itscpc178:/home/swan # yast2
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
y2controlcenter: cannot connect to X server :0.0
itscpc178:/home/swan # exit
swan@itscpc178:~> /sbin/yast2
|
What should I config, in order I could run these X programs when I "su"?
I would be very grateful if I could receive your favorable reply.
Thanks!!
|
|
|
|
06-09-2005, 08:43 AM
|
#2
|
|
Senior Member
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,694
Rep:
|
either use 'sux -' instead of 'su' or enter 'xhost +localhost'
|
|
|
|
06-09-2005, 08:45 AM
|
#3
|
|
Senior Member
Registered: Aug 2003
Location: Upstate
Distribution: Debian, ubuntu
Posts: 1,153
Rep:
|
As normal user, you can run: and then root will be able to open x programs. You can edit /root/.bashrc and add the following line:
Code:
export XAUTHORITY=/home/name/.Xauthority
Where "name" is the user account name that you use. After editing /root/.basrc, you won't have to issue the command "xhost local:root" anymore after X starts.
|
|
|
|
06-09-2005, 09:39 AM
|
#4
|
|
Member
Registered: Apr 2005
Posts: 37
Original Poster
Rep:
|
Thanks very much for you guys kind help!!!
|
|
|
|
02-16-2007, 08:01 AM
|
#5
|
|
LQ Newbie
Registered: Feb 2007
Posts: 5
Rep:
|
I don't have /root/.bashrc (nor /home/root/.bashrc). I'm using Debian etch. What could I do?
|
|
|
|
02-16-2007, 08:11 AM
|
#6
|
|
Senior Member
Registered: Aug 2003
Location: Upstate
Distribution: Debian, ubuntu
Posts: 1,153
Rep:
|
Are you looking as root user? First "su" to become root. Try this:
Code:
su
nano /root/.bashrc
Do you see any text there from the .bashrc file?
|
|
|
|
02-16-2007, 09:09 AM
|
#7
|
|
LQ Newbie
Registered: Feb 2007
Posts: 5
Rep:
|
I'm sure.
code:
$su
#cd /root
#ls .bashrc
ls: .bashrc: Arquivo ou diretório não encontrado
The fouth line means: "File or directory not found".
Thanks for the trying.
|
|
|
|
02-16-2007, 09:20 AM
|
#8
|
|
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307
Rep:
|
Install sux like rshaw said a year ago
|
|
|
|
02-16-2007, 05:25 PM
|
#9
|
|
LQ Newbie
Registered: Feb 2007
Posts: 5
Rep:
|
Sux is already installed.
Code:
#apt-get install sux
Lendo lista de pacotes... Pronto
Construindo árvore de dependências... Pronto
sux já é a versão mais nova.
0 pacotes atualizados, 0 pacotes novos instalados, 0 a serem removidos e 184 não atualizados.
(in the fourth line apt says that sux is in its newest version)
And when I try:
I get
Code:
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
xhost: unable to open display ":0.0"
and also
Code:
$ xhost +localhost
localhost being added to access control list
$ su
# emacs
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.
The trick wich alway works well, but just till I reboot, is
Code:
cp /home/jcconegundes/.Xauthority /home/root
Last edited by jcconegundes; 02-16-2007 at 05:38 PM.
|
|
|
|
02-16-2007, 07:23 PM
|
#10
|
|
LQ Newbie
Registered: Feb 2007
Posts: 5
Rep:
|
I added
Code:
export XAUTHORITY=/home/regular_user/.Xauthority
in /etc/profile. And now, it works even if I reboot.
That was not a clean work, I think. Any better sugestion?
|
|
|
|
05-13-2007, 03:31 PM
|
#11
|
|
LQ Newbie
Registered: Feb 2007
Posts: 1
Rep:
|
Quote:
|
Originally Posted by m_yates
As normal user, you can run: and then root will be able to open x programs. You can edit /root/.bashrc and add the following line:
Code:
export XAUTHORITY=/home/name/.Xauthority
Where "name" is the user account name that you use. After editing /root/.basrc, you won't have to issue the command "xhost local:root" anymore after X starts.
|
Thanks for the help!
|
|
|
|
07-17-2007, 12:16 PM
|
#12
|
|
LQ Newbie
Registered: Aug 2003
Location: Portugal
Distribution: Mandriva
Posts: 21
Rep:
|
Quote:
|
Originally Posted by m_yates
As normal user, you can run: and then root will be able to open x programs. You can edit /root/.bashrc and add the following line:
Code:
export XAUTHORITY=/home/name/.Xauthority
Where "name" is the user account name that you use. After editing /root/.basrc, you won't have to issue the command "xhost local:root" anymore after X starts.
|
This is only good when running from a shell.
In /etc/profile i do have a line with:
export XAUTHORITY=/home/name/.Xauthority[/CODE]
but when i run konqeror as root (and is runned by clicking in the konquerorsu icon in kmenu), when double clicking in a text file, i get this error:
KDEInit cant launch 'kwrite'.
So i continue to have to run in a console "xhost local:root".
How am i gona solve this permanently? Add "export XAUTHORITY=/home/name/.Xauthority" to /etc/etc/rc.d/rc.local ?
Isnt there a better solution?
|
|
|
|
10-24-2007, 11:12 AM
|
#13
|
|
LQ Newbie
Registered: Jun 2007
Posts: 2
Rep:
|
Partly Worked
Quote:
Originally Posted by kiel2155
Thanks for the help!
|
Thank you very much for sharing the solution 
but only the command part worked for me. I have to issue the command every time I start thunderbird.
|
|
|
|
10-24-2007, 02:47 PM
|
#14
|
|
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307
Rep:
|
Even simpler:
Link to the current correct cookie
$ su -
type your password
# ln -s /home/user/.Xauthority
|
|
|
|
11-18-2007, 01:20 AM
|
#15
|
|
LQ Newbie
Registered: Jun 2006
Location: Berkeley
Distribution: Puppy Linux
Posts: 6
Rep:
|
Quote:
Originally Posted by jcconegundes
I don't have /root/.bashrc (nor /home/root/.bashrc). I'm using Debian etch. What could I do?
|
in case you return to read this and are not yet clear: just add /root/.bashrc
You can create it with just that one line that was suggested for this problem:
Code:
export XAUTHORITY=/home/name/.Xauthority
or you can add other commands, aliases etc. that you might want to have as well. Check out http://www.faqs.org/docs/abs/HTML/files.html for information on what this and the related files do. Basically they are where you configure systemwide [/etc/.bashrc and /etc/.profile] and user-specific [$HOME/.bashrc and $HOME/.bash_profile] functions and aliases (for bash shell only).
This means you, as the administrator of your computer, get to decide what all goes in them. Typically, users would decide what goes in their own $HOME/.bashrc and $HOME/.bash_profile - most likely that is also you. My main point is that they are there for your convenience, rather than being some untouchable and necessarily mysterious file of the "us mortals shall not touch" category.
This link explains more clearly the difference between these different files: http://www.linuxquestions.org/questi...bashrc-273992/
Note: $HOME refers to your home directory, for example it might be /home/kiel2155/.bashrc
Hope this helps.
Fitzhugh
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:05 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|