Linux - SoftwareThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
#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:
Code:
# xhost +localhost
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.
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.
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 ?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.