LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Newbie Configuration of Apache Server (https://www.linuxquestions.org/questions/linux-newbie-8/newbie-configuration-of-apache-server-318329/)

tspeicher 04-30-2005 07:41 PM

Typing lpq immediately showed me the problem. The print q showed all the jobs I had tried and the printer listed was a generic dot matrix that got installed automatically. I went into the lprntool and deleted the wrong printer and then tried it again and it worked!! Thanks!

The printing also worked from Mozilla. Excellent!

Ok, through all of this I am confused by something minor. I was following the detailed instructions for installing Debian. At the end, the author showed us how to log in as an ordinary (non-root) user, open a terminal window, type "su" to change to root, and run synaptic to install new programs. That worked great until I rebooted. Then when I logged back in as a lowly user and opened xterm and typed in su, then tried to run synaptic, it says :

xlib: connection to ":0.0" refused by server
xlib: client is not authorized to connect to server synaptic: could not open display

So now I have to log in as root to run synaptic. Any idea why?

perfect_circle 05-01-2005 11:43 AM

Are you sure you did not type "su -" the second time?
Anyway the problem is that the X session belong to the user and it refuses the root connections.
I cannot remember how to solve it, but if you are using KDE try:
kdesu -c synaptic

btmiller 05-01-2005 11:49 AM

You can also solve the problem by doing

xhost +localhost

as your user. This will have the X server accept all connectionbs from the local machine.

tspeicher 05-01-2005 10:04 PM

Quote:

Originally posted by perfect_circle
Are you sure you did not type "su -" the second time?
Anyway the problem is that the X session belong to the user and it refuses the root connections.
I cannot remember how to solve it, but if you are using KDE try:
kdesu -c synaptic

I'm certain I didn't type "su -" because I don't even know what that means. I am using WindowMaker.



Quote:

Originally posted by btmiller
You can also solve the problem by doing

xhost +localhost

as your user. This will have the X server accept all connectionbs from the local machine.

I don't understand using xhost +localhost as my user. Can you explain?

btmiller 05-01-2005 10:11 PM

After you have started your GUI, open a terminal window and type "xhost +localhost" (no quotes).

tspeicher 05-02-2005 09:35 AM

after I logged in, I opened a terminal window and typed in "xhost +localhost". It replied that the localhost was added to the access control list.

Then I typed "su" to change to root to run synaptic and got the same message as before:


xlib: connection to ":0.0" refused by server
xlib: client is not authorized to connect to server
synaptic: could not open display

????

tuxrules 05-02-2005 10:58 AM

you probably did xhost +localhost for normal user and not as root. You need to do it for root as well.

On the root terminal do again.
# xhost +localhost

it should work...

Tux

tspeicher 05-03-2005 12:21 AM

I did it in a terminal window after typing su to change to root.

After your post, I shutdown xwindows, logged out, logged in as root, started xwindows, opened a terminal window, typed "xhost +localhost" and then shutdown xwindows, logged out from root, logged back in as a normal user, started xwindows, opened terminal windows, typed su to change to root, ran synaptic and it worked.

You were correct about the fix. Can you explain it to me a little bit? What did that do?

And, of course...Thanks!

-Terry

perfect_circle 05-03-2005 05:35 AM

Quote:

Originally posted by tspeicher
I did it in a terminal window after typing su to change to root.

After your post, I shutdown xwindows, logged out, logged in as root, started xwindows, opened a terminal window, typed "xhost +localhost" and then shutdown xwindows, logged out from root, logged back in as a normal user, started xwindows, opened terminal windows, typed su to change to root, ran synaptic and it worked.

You were correct about the fix. Can you explain it to me a little bit? What did that do?

And, of course...Thanks!

-Terry

Well the man page is your friend:
Code:

NAME
      xhost - server access control program for X

SYNOPSIS
      xhost [[+-]name ...]

DESCRIPTION
      The  xhost  program is used to add and delete host names or user names to
      the list allowed to make connections to the X server.  In  the  case  of
      hosts,  this provides a rudimentary form of privacy control and security.
      It is only  sufficient  for  a  workstation  (single  user)  environment,
      although it does limit the worst abuses.  Environments which require more
      sophisticated measures should implement the user-based mechanism  or  use
      the  hooks  in  the protocol for passing other authentication data to the
      server.

*EDIT*
Also with su - you login as a different user, (if you don't specify username, the as root) the same as simply typing su but it also loads the enviroment of the different user, (reads .profile, etc) and will probable redirect you in the home directory of the user. Try it out.

tspeicher 05-05-2005 04:45 PM

I turned off the machine and turned it back on today, and now I'm back to having the same problem -- I can't run su from xterm and then run synaptic. I even went back and repeated the procedure that worked last time but was unable to get it to work. Is that normal? (Well, obviously it is for me.)

arcturus 05-05-2005 10:30 PM

Re: Newbie Configuration of Apache Server
 
Quote:

Originally posted by tspeicher
I have successfully installed Debian (thanks to the wonderful guide available here online).
Forgive me, could you point me to the specific guide you're referring to? Thanks.

tspeicher 05-06-2005 12:41 AM

Be glad to. I found it under the Forums (on this site), Linux Distros, Debian, Debian Configuration Post Install.

That post will have this link in it: http://osnews.com/story.php?news_id=2016

It was a great guide for me.


All times are GMT -5. The time now is 08:59 AM.