LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2005, 08:41 PM   #16
tspeicher
Member
 
Registered: Jan 2005
Distribution: Fedora 2.0
Posts: 38

Original Poster
Rep: Reputation: 15

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?
 
Old 05-01-2005, 12:43 PM   #17
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
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
 
Old 05-01-2005, 12:49 PM   #18
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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.
 
Old 05-01-2005, 11:04 PM   #19
tspeicher
Member
 
Registered: Jan 2005
Distribution: Fedora 2.0
Posts: 38

Original Poster
Rep: Reputation: 15
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?
 
Old 05-01-2005, 11:11 PM   #20
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
After you have started your GUI, open a terminal window and type "xhost +localhost" (no quotes).
 
Old 05-02-2005, 10:35 AM   #21
tspeicher
Member
 
Registered: Jan 2005
Distribution: Fedora 2.0
Posts: 38

Original Poster
Rep: Reputation: 15
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

????
 
Old 05-02-2005, 11:58 AM   #22
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,153

Rep: Reputation: 60
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
 
Old 05-03-2005, 01:21 AM   #23
tspeicher
Member
 
Registered: Jan 2005
Distribution: Fedora 2.0
Posts: 38

Original Poster
Rep: Reputation: 15
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
 
Old 05-03-2005, 06:35 AM   #24
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
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.

Last edited by perfect_circle; 05-03-2005 at 06:41 AM.
 
Old 05-05-2005, 05:45 PM   #25
tspeicher
Member
 
Registered: Jan 2005
Distribution: Fedora 2.0
Posts: 38

Original Poster
Rep: Reputation: 15
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.)
 
Old 05-05-2005, 11:30 PM   #26
arcturus
Member
 
Registered: Oct 2002
Posts: 37

Rep: Reputation: 15
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.
 
Old 05-06-2005, 01:41 AM   #27
tspeicher
Member
 
Registered: Jan 2005
Distribution: Fedora 2.0
Posts: 38

Original Poster
Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP configuration with apache web server vikrambhimbar Linux - Software 4 12-17-2005 05:04 AM
Apache vhost issues (client denied by server configuration) bpk Linux - Software 8 02-16-2005 08:02 PM
configuration of httpd.conf to run apache server adityabhat2 Linux - Newbie 2 02-13-2005 01:10 PM
Apache Server Newbie Hollywood W Linux - Software 5 05-11-2003 02:12 AM
tomcat server configuration with apache on RHL 7.2, 6.2 sathu Linux - Software 0 02-05-2002 08:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration